mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-18 19:02:00 +02:00
@@ -25,6 +25,18 @@ export default class Keyboard {
|
|||||||
let method;
|
let method;
|
||||||
let argument;
|
let argument;
|
||||||
|
|
||||||
|
// Check if there's a focused element that might use the keyboard.
|
||||||
|
if (document.activeElement) {
|
||||||
|
const isContentEditable = document.activeElement
|
||||||
|
.contentEditable !== 'inherit';
|
||||||
|
const isInput = ['INPUT', 'SELECT', 'OPTION', 'TEXTAREA']
|
||||||
|
.indexOf(document.activeElement.tagName) > -1;
|
||||||
|
|
||||||
|
if (isInput || isContentEditable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (event.which) {
|
switch (event.which) {
|
||||||
case Keys.AV_PAGE:
|
case Keys.AV_PAGE:
|
||||||
case Keys.SPACE:
|
case Keys.SPACE:
|
||||||
|
Reference in New Issue
Block a user