mirror of
https://github.com/codex-team/editor.js
synced 2024-05-19 06:47:16 +02:00
Remove redundant condition
This commit is contained in:
parent
eb1a7128da
commit
4f200a64a8
|
@ -206,18 +206,6 @@ export default class Flipper {
|
|||
* @returns {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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue