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'm using Mousetrap with Polymer, and I just noticed that events in inputs aren't stopped by default. The reason for this is that Mousetrap uses target or srcElement in the stopCallback function, but when the event occurs in a shadow DOM, the events are retargeted to look like they come from the host element.
A fix would be to use the first element from the event path if event.path is available.
The text was updated successfully, but these errors were encountered:
robinsk
changed the title
Support shadow DOM in stopCallback
Support events occuring in input fields when using a shadow DOM
Jan 12, 2015
robinsk
changed the title
Support events occuring in input fields when using a shadow DOM
Stop events occuring in input fields when using a shadow DOM
Jan 12, 2015
I'm using Mousetrap with Polymer, and I just noticed that events in inputs aren't stopped by default. The reason for this is that Mousetrap uses
target
orsrcElement
in thestopCallback
function, but when the event occurs in a shadow DOM, the events are retargeted to look like they come from the host element.A fix would be to use the first element from the event path if
event.path
is available.The text was updated successfully, but these errors were encountered: