Skip to content

Loading…

Gestures.handleNative sometimes throws "Unable to get property mousedown of undefined or null reference" in IE11 #2641

Closed
wicksell opened this Issue · 2 comments

2 participants

@wicksell

When using <paper-dropdown-menu> and selecting an item in IE11 I get the error "Unable to get property mousedown of undefined or null reference". The error originates from Gestures.handleNative. The statement node[GESTURE_KEY] is undefined. If i add the following line

    if (!gobj) gobj = unwrap(node)[GESTURE_KEY];

everything works perfect. So the problem seems to be that the node is not wrapped when passed to Gestures.add but is when the event is received.

@wicksell

I have investigated my problem further and found that it may be related to #1001. A change to iron-overlay-behavior adds a gesture listener on document, see PolymerElements/iron-overlay-behavior@ad1cda0. On registration document is not wrapped but webcomponentsjs always wrap events when Shadow DOM is polyfilled so in Gestures.handleNative the event target is wrapped and thus the property GESTURE_KEY is not available.

@azakus azakus self-assigned this
@azakus
Owner

Just need to land webcomponents/webcomponentsjs#434 first, then I can make this work as expected.

@azakus azakus referenced this issue from a commit
@azakus azakus Fix Gestures when using SD polyfill
Test with SD polyfill and native ShadowDOM
Requires webcomponents/webcomponentsjs#434

Fixes #2641
96e4bfa
This was referenced
@azakus azakus added the p1 label
@sorvell sorvell closed this in #2684
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.