mirror of
https://github.com/codex-team/editor.js
synced 2024-06-10 09:52:36 +02:00
Remove redundant condition
This commit is contained in:
parent
eb1a7128da
commit
4f200a64a8
|
@ -206,18 +206,6 @@ export default class Flipper {
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
private isEventReadyForHandling(event: KeyboardEvent): boolean {
|
private isEventReadyForHandling(event: KeyboardEvent): boolean {
|
||||||
const isCurrentItemIsFocusedInput = this.iterator.currentItem == document.activeElement;
|
|
||||||
const arrowKeysList = [
|
|
||||||
_.keyCodes.LEFT,
|
|
||||||
_.keyCodes.RIGHT,
|
|
||||||
_.keyCodes.UP,
|
|
||||||
_.keyCodes.DOWN,
|
|
||||||
];
|
|
||||||
|
|
||||||
if (isCurrentItemIsFocusedInput && arrowKeysList.includes(event.keyCode)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.activated && this.allowedKeys.indexOf(event.keyCode) !== -1;
|
return this.activated && this.allowedKeys.indexOf(event.keyCode) !== -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue