Remove redundant condition

This commit is contained in:
Tanya Fomina 2022-04-10 22:49:08 +08:00
parent eb1a7128da
commit 4f200a64a8

View file

@ -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;
}