-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Normalized event difference with ShadowDOM and Shady #1921
Comments
The expected result is the following on both Shady & Shadow:
The discrepancy appears to originate in the gesture system. Using |
It's strange, i've tested it with a click, and localTarget always seems to be my app top-level element, on both shadow and shady. |
Wow, forget my last words. I made a mistake : i was logging Polymer.log(e), and then i was clicking on the localTarget property in chrome console to resolve the "getter" ... and it seems it's not correctly resolved (context problem ?) |
@kevinpschaaf I was expecting to get |
Right, the object returned from You should never expect to see As I said, the bug appears to originate in the gesture system, as it is only the gesture-simulated events that have incorrect targets, not native ones like |
@kevinpschaaf
|
This is just a holdover from the initial design, where gesture events were non-bubbling. Should be pretty easy to change the initiator from |
Ah, so the real problem is that when the event gets to the gesture recognizer, it has already passed through the shadowdom boundary and lost the original target. I'll have to use @kevinpschaaf we may to discuss the performance impact of this for ShadyDOM. |
Fixes #1921 Update tests with new event target expectations Incorporate structure from http://jsbin.com/lohepic/edit?html,console,output
Fixes #1921 Update tests with new event target expectations Incorporate structure from http://jsbin.com/lohepic/edit?html,console,output
@kevinpschaaf @azakus This one could still be an issue. Or I might be doing this all wrong. I updated @kevinpschaaf jsbin to pass content as light DOM and I understand that Light DOM is ignored here and I therefore get |
Looks like this is certainly a bug with ShadyDOM. If I enable ShadowDOM in above sample, it works. The problem is with ShadyDOM. |
Hello,
i've an element which contains a paper-fab, and a tap event as :
This element is instantiate into a tree of other elements, starting from a top element "my-app" instantiated in the html body.
I've one unique handler for 3 paper-fab. So in the handler, i want to identify the clicked paper-fab.
but i found in the normalized event object that :
Anthony.
The text was updated successfully, but these errors were encountered: