You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am sending to the keybindings function an iframe body reference and the events are not fired.
I found out this is because of this check if (!(event instanceof KeyboardEvent)) { return }.
From what I read on MDN, instanceof doesn't work as expected when used between different contexts, such as different frames, because they have different execution environments so even the KeyboardEvent type is considered different.
The text was updated successfully, but these errors were encountered:
Instead of if (!(event instanceof KeyboardEvent)) { return }, a check on the constructor name can be done -> if (event.constructor.name !== 'KeyboardEvent') { return }
I am sending to the keybindings function an iframe body reference and the events are not fired.
I found out this is because of this check
if (!(event instanceof KeyboardEvent)) { return }
.From what I read on MDN, instanceof doesn't work as expected when used between different contexts, such as different frames, because they have different execution environments so even the KeyboardEvent type is considered different.
The text was updated successfully, but these errors were encountered: