jquery-archive / PEP

Pointer Events Polyfill: a unified event system for the web platform
https://www.w3.org/TR/pointerevents/
Other
1.67k stars 160 forks source link

Touch: keep firing pointer events after element removal #370

Closed dirkluijk closed 5 years ago

dirkluijk commented 6 years ago

According to the docs, touch events are still dispatched when the element is removed:

If the target element is removed from the document, events will still be targeted at it, and hence won't necessarily bubble up to the window or document anymore. If there is any risk of an element being removed while it is being touched, the best practice is to attach the touch listeners directly to the target.

For pointer events, we need those events to correctly propagate them so that you still receive pointer events when an element is removed during a drag (touch) operation.

See https://stackoverflow.com/questions/33298828/touch-move-event-dont-fire-after-touch-start-target-is-removed.

Closes https://github.com/jquery/PEP/issues/367.

jsf-clabot commented 6 years ago

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.