New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 666407 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

Touchmove events do not fire when target is removed

Reported by chris.ma...@gmail.com, Nov 17 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36

Steps to reproduce the problem:
1. https://jsfiddle.net/6mrpy733/9/
2. Open the console to see when the touchmove handler is hit.
3. Drag the red circle and note that no touchmove events are received as soon as the element is removed. 

What is the expected behavior?
I would expect the events to continue to bubble to the parent. Also, this is how it works with mouse events.

What went wrong?
No touchmove events are sent.

Did this work before? No 

Does this work in other browsers? No
 Reproduced in Firefox as well.

Chrome version: 54.0.2840.100  Channel: stable
OS Version: 
Flash Version: Shockwave Flash 23.0 r0

When an item is remove from the DOM that was the target of an touchstart, no more touchmove events are fired until the element is re-added.
 
Tested in Chrome 54, iOS 9 Safari, and Chrome 54 on Android.
Labels: -Pri-2 Needs-Bisect Needs-Triage-M54 M-54 Pri-1
M54 is not a realistic milestone for a fix, but team is on the process of triaging and will add appropriate Milestone.
Cc: sureshkumari@chromium.org
Labels: TE-NeedsTriageFromMTV
Unable to reproduce the issue on Windows-10 (touch screen) using chrome stable version 54.0.2840.99 and canary 56.0.2922.0 with the steps mentioned above.
Please find the attached screen-cast for reference.
Could some one from MTV team please check on Linux touch screen if available.

Thanks..
666407.mp4
1.9 MB View Download
Based on the attached video you did reproduce the issue. The red circle was initially hidden for 1 second, and no touchmove events were received during that time. After the red circle was added back in you started receiving events again. Try increasing the delay on line 53 to make it more noticeable. 
Cc: dtapu...@chromium.org
Status: WontFix (was: Unconfirmed)
The problem you are experiencing is the fact that touch events are implicitly captured so they are sent to the EventTarget which is the child dom node and the events don't bubble up when it is removed because the target is disconnected from the DOM.

This creates a problem because you are using jquery and it uses event delegation so the touchmoves don't fire on the DOM you don't see them on your bound jquery target. 

However if you don't use event delegation and add an event listener directly they do work.

Here is an example working:

https://jsfiddle.net/f3gr417m/2/

I just tried it without jQuery and I got the same result: https://jsfiddle.net/6mrpy733/11/
Labels: Hotlist-Input-Dev

Sign in to add a comment