Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop events occuring in input fields when using a shadow DOM #245

Closed
robinsk opened this issue Jan 12, 2015 · 1 comment · Fixed by #445
Closed

Stop events occuring in input fields when using a shadow DOM #245

robinsk opened this issue Jan 12, 2015 · 1 comment · Fixed by #445

Comments

@robinsk
Copy link

robinsk commented 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 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.

@robinsk robinsk changed the title Support shadow DOM in stopCallback Support events occuring in input fields when using a shadow DOM Jan 12, 2015
@robinsk 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
@ccampbell
Copy link
Owner

I'd be happy to fix this... Do you have an example or test that I could use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants