New issue
Advanced search Search tips

Issue 615895 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Is it correct to send TouchEvents and corresponding MouseEvents to different frames?

Project Member Reported by mustaq@chromium.org, May 30 2016

Issue description

Tested with Chrome stable on Linux with Touch Emulation.

0. Run Chrome on a touch-device (or with touch emulation).
1. Go to https://output.jsbin.com/vipuca.
2. Tap on pink, the pink frame moves away from the finger.
3. Tap on green in the same place as before, the pink frame moves back under the finger.

Actual output:
At step 2, the TEs are sent to pink, but the corresponding MEs are sent to green.
At step 3, the TEs are sent to green, but the corresponding MEs are sent to pink.

It's not clear to me what's the expected output here.
 
I want to bring this up for pointerevents as well. Since the layout can change after pointer event handler and the mouse event should still be sent to somewhere.
Mustaq, are you only concerning about the different frames case or do you think any different target may cause an inconsisteny here?
Originally I was only worried about the different frame case.  For a non-frame target, this is clearly WAI since we have to execute one event-handler before another.

For frames, I was a bit worried about sort of clickjacking. Is it possible to create malicious clicks (or touchends or any user gesture) this way?  It now seems to me that first event listener is in control here, so the answer is perhaps "no".

Yeah I can see how this could be problematic - similar to  issue 625198 .  Generally when the page is doing something in response to the TE or PE it should call preventDefault which will suppress the generation of ME.  So I don't _think_ this should be a big deal.  

I believe Safari has this same behavior, but what about Edge and Firefox?  Assuming it's the same everywhere then I think we should just say this is the expected behavior and revisit only if there's a scenario where it causes problems for developers in practice.

Edge: The "mousedown" is fired before the frame is moved (so different mousedown/mouseup targets). "Touchend is delayed to "mouseup" but still goes to the "touchstart"/"mousedown" frame.

FF: Couldn't enable TouchEvents, seems to ignore the about:config setting!

Comment 5 by bru...@gmail.com, Jul 27 2017

We are seeing an issue with "mouseup" events not firing if the mousedown starts in a frame, (eg. resizing a textarea in an iframe) but resizing it to outside the frame. Not sure if they are related or i should open a new bug?

repro steps
1. go here https://dev.innomate.com/frameme.html
2. click the job link
3. click apply
4. scroll down to the textarea
5. resize it vertically outside the frame

actual result:
nothing happens if you let the mousebutton go outside the frame

expected result:
there is a mousedown event on the textarea, that resizes the surrounding iframe.


Comment 6 by mustaq@chromium.org, Jul 27 2017

Hi brunis@: Your bug is different not relevant to TouchEvents.  Please file a separate bug.  I couldn't repro, so we will need more information (Chrome version, OS, ...).

Sign in to add a comment