Issue metadata
Sign in to add a comment
|
Touch events that are originating in a webview do not filter up to the document even listner
Reported by
jriggmcp...@gmail.com,
Mar 30 2016
|
||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36
Platform: 7834.60.0 Stable channel Panther
Steps to reproduce the problem:
1. In chrome app api, create a web view
2. in the document parent, add an addEventListener for touch events
3. Console log when a touch event occurs.
What is the expected behavior?
The parent document should get the event, however latest version of Chrome this does not occur.
What went wrong?
Webview is no sending touch events up to the parent document.
Mouse events still work as expected.
document.addEventListener("touchmove", idleTimer, false); // won't work
document.addEventListener("mousemove", idleTimer, false); // works
WebStore page:
Did this work before? Yes
Chrome version: 49.0.2623.95 Channel: stable
OS Version:
Flash Version:
,
Mar 31 2016
,
Apr 1 2016
,
Apr 1 2016
Confirmed that this is a regression.
App using "document.addEventListener("touchmove", idleTimer, false);" is working fine on:
Sumo
48.0.2564.116
but not working on:
Sumo
49.0.2623.95
,
Apr 1 2016
,
Apr 1 2016
,
Apr 1 2016
,
Apr 1 2016
Juan is OOO. Is regression per #4. Assigning for fix.
,
Apr 2 2016
,
Apr 4 2016
Assigning to rbyers to triage in upper layers
,
Apr 4 2016
This is a Chrome App using <webview> tag, right? Then wjmaclean is the expert.
,
Apr 4 2016
I guess we disconnected this in https://codereview.chromium.org/1412923009/ when we started routing touch events for WebViews directly to the guest renderer, bypassing the embedder. I guess we need to think about a suitable pathway to take touches that are unconsumed by the guest and make them available to the embedder ... Adding tdresser@ as we'll need his input as to how best to accomplish this.
,
Apr 4 2016
,
Apr 5 2016
Would enabling this be safe from a security perspective? Are we planning to enable the parent document to see touch events targeted at OOPIFs?
,
Apr 5 2016
For webviews, there is no security problem with the embedder listening for events that target the guest, because chrome apps are trusted more than web content. This would be a security problem on the open web, though, which is why out-of-process iframes do not have this property and need to have input routed directly from the browser process. This bug is a consequence of the ongoing work to bring the two architectures together. I was really hoping to get rid of the input event forwarding code from embedder to guest but it isn't clear how to solve this problem if we do that.
,
Apr 5 2016
James, can we share the event reposting logic with gestures?
,
Apr 5 2016
Re #16: yes, and we could even potentially do something better than re-posting (e.g. never targeting the guest if it doesn't have a touch handler, or re-targeting the event if the ack from the guest indicates the event was unconsumed). However, that the touch events ever went to the embedder in the first place may have been unintended. I'm curious to know what the use case is for wanting the embedder to process the touch events that nominally belong to the guest? Does the guest have a touch handler in this use-case? (If it does, it seems odd that we would have multiple handlers firing for a single event.)
,
Apr 5 2016
From a web developer's perspective, it would be ideal if webviews didn't have any impact on event dispatch. https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow-basic i.e., capturing listeners in the embedder should see the event before the webview gets a crack at it.
,
Apr 5 2016
For some additional context, capturing listeners on embedded plugins (via <object> tag) *do* fire for input events targeting them, but that is not true on Firefox, and there is a bug assigned to me arguing that we should match their behavior. Obviously iframe embedders do not see events targeted to the iframes. The latter is compliant to spec because capture and bubble do not pass through nested browsing contexts. Both of the above are important for security reasons, which is not true for <webview>. Still, since it is a separate browsing context I would argue that we shouldn't capture/bubble across the boundary, except that it differs from how events worked before and there is a lot of value in simply not changing behavior of features that developers are using.
,
Apr 6 2016
,
Apr 12 2016
The flash content in the webview will receive a wrong touch position because of this bug. As the attached picture shown, the webview start from (i, j), and if we touch the blue point (x, y), the purple point (x+i, y+j) will actually be clicked. This can be reproduced in this app https://github.com/KochiyaOcean/chrome-webview-bug
,
Apr 13 2016
Re #21 I don't think this bug is the cause of the coordinates for the events being wrong in the webview; wyf7789@, could you please create a separate bug for that, and include your sample app and screenshot? Thanks. Given the desire to use the same codepath for webview and oopif, and given that it's possible to inject script into a webview to allow it to share events with its embedder, I'm going to mark this as wontfix. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by blumberg@chromium.org
, Mar 31 2016