Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Missing pointerup events when using touch input. #115

Closed
rsadam-google opened this issue Dec 13, 2013 · 2 comments
Closed

Missing pointerup events when using touch input. #115

rsadam-google opened this issue Dec 13, 2013 · 2 comments

Comments

@rsadam-google
Copy link

I'm running into an error with touch to pointerEvents, where pointer up's are not being generated if the content being touched changes after the touch has started. Moreover Polymer sometimes crashes with the error message: "Object # has no method 'elementFromPoint'"

Device info:
Chromebook Pixel
Browser: Chromium 33.0.1735.0 (Developer Build 239803)

For an example where the error message consistently appears:

  1. Open http://jsfiddle.net/6q9ws/12
  2. Touch the grey box.

For the missing pounterUp event:

  1. Open http://jsfiddle.net/6q9ws/13/
  2. Touch the grey box

Expected output:
touch
mode a:down
touch
mode b:up

Actual ouput:
touch
mode a:down

@dfreedm
Copy link
Contributor

dfreedm commented Dec 13, 2013

Ah, this looks like a native Custom Elements vs polyfill ShadowDOM issue.

In M33, we need chrome://flags/#enable-experimental-web-platform-features and chrome://flags/#enable-javascript-harmony turned on for now.

With those flags on, your demos work as expected.

@dfreedm
Copy link
Contributor

dfreedm commented Jan 7, 2014

I've been looking at this bug just now, and I think the main issue is that the targetFinding code for the touches can accidentally return an element instead of Document or ShadowRoot if the element gets disconnected from the DOM.
This issue only seems to manifest in the ShadowDOM Polyfill probably due to some quirk in the overriding of parentNode. Making sure a valid root is returned from this.owner seems to fix this.

@dfreedm dfreedm closed this as completed in 8045762 Jan 7, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants