Skip to content

Commit

Permalink
bind keypress envent on root div instead of window object
Browse files Browse the repository at this point in the history
  • Loading branch information
jparez committed Mar 18, 2024
1 parent e4866ca commit 9fb1638
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/KeyboardEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ module.exports = class KeyboardEvents {
}
this.instance.root.focus();
this.keyboardCallbacks.forEach((item, index, array) => {
array[index].removeListener = this.instance.addListener(window, item.event, item.handler);
array[index].removeListener = this.instance.addListener(this.instance.root, item.event, item.handler);
});
this.isListenerAdded = true;
}
Expand Down

0 comments on commit 9fb1638

Please sign in to comment.