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 currently creating keyboard video control shortcuts similar to YouTube which involves adding a keypress event listener bound to the <body>. The event handler
Behaviorally, it works as intended, however in my unit tests, the event handler doesn't seem to be invoked when using MockInteractions.pressSpace or any other keyboard interaction functions. Debugging through I noticed that the document.activeElement is in fact the <body> so I am unsure what the issue is.
Description
I am currently creating keyboard video control shortcuts similar to YouTube which involves adding a
keypress
event listener bound to the<body>
. The event handlerBehaviorally, it works as intended, however in my unit tests, the event handler doesn't seem to be invoked when using
MockInteractions.pressSpace
or any other keyboard interaction functions. Debugging through I noticed that thedocument.activeElement
is in fact the<body>
so I am unsure what the issue is.Any ideas how to solve this problem?
I am using Polymer 2 with
"iron-test-helpers": "PolymerElements/iron-test-helpers#^2.0.0"
as a devDependencyThe text was updated successfully, but these errors were encountered: