New issue
Advanced search Search tips

Issue 864246 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 739213
Owner:
Closed: Oct 16
Cc:
Components:
EstimatedDays: ----
NextAction: 2018-10-16
OS: Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Pinch to zoom broken in cross-origin iframes (even in file:// and chrome-extension://)

Reported by tolma...@gmail.com, Jul 16

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

Steps to reproduce the problem:
So, we actually ran into this trying to put an iframe in a chrome extension and finding out that for whatever reason pinch to zoom stopped working, but upon further investigation it became clear that it wasn't just a chrome extension issue, but rather ANY iframe on a different origin never receives pinch events (i.e. scrollwheel event with ctrlKey set to true). The host page (expectedly) also doesn't receive it, so the event is just lost.

I've provided a reduction that can be run in 3 different modes:

1. You can drag and drop xorigin-punch-reduction/index.html into your browser to test it from the file:// origin.
2. You can start up a simple server (ala python -m SimpleHTTPServer 9090) and view it by doing localhost://9090 (if you use a different port, please do localhost://PORT?port=PORT, sorry this isn't more ideal)
3. You can install it as an extension (but you will still have to run the server for one of the 4 test cases included).

Once loaded, you will see something like the attached image. There are four quadrants on the page:

1. TOP LEFT: This will ALWAYS work in every of the above configuration, it just reports pinch events on the host index.html page.
2. BOTTOM LEFT: This will ALWAYS work in every of the above configurations as well, as it loads a test page in an iframe with a relative URL. Thus, when loaded locally it uses file://, when loaded on localhost it uses localhost, and when loaded on chrome-extension:// it will use chrome-extension://.

3. TOP RIGHT: This will NEVER work in every of the above configurations. Since it is a google maps iframe and none of the configurations are on the google.com origin, the map will never receive pinch events. Interestingly enough, this means the only please pinch to zoom works on google maps is the google maps developer page, which is in retrospect hilariously frustrating, as initially we kept thinking we were just doing something wrong as we kept checking back to that page.
4. BOTTOM RIGHT: This will ONLY work in the localhost configuration. This is because the page loads "localhost:9090/iframe.html", so in file:// and chrome-extension:// it fails due to cross origin (I guess?), but in localhost it passes same origin.

What is the expected behavior?
I expect pinch to zoom to work in all 4 configurations, scrollwheel with ctrlKey true seems to be the only kind of event that is just completely swallowed in this scenario. It is completely understandable that the host page does not receive the event (as that would match the behavior will other events), but I don't understand why the iframe doesn't receive it.

What went wrong?
Scrollwheel event wasn't sent.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 67.0.3396.99  Channel: stable
OS Version: OS X 10.13.5
Flash Version:
 
example.png
439 KB View Download
xorigin-scrollwheel-reduction.zip
10.6 KB Download
Correction to the above, its "mousewheel" event not "scrollwheel".
Labels: Needs-Triage-M67
Components: Blink>Input
Labels: Triaged-ET M-69 Target-69 FoundIn-69 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Mac 10.13.3, Win-10 and Ubuntu 17.10 using chrome reported version #67.0.3396.99 and latest canary #69.0.3494.0.
This is a non-regression issue as it is observed from M60 old builds. 

Hence, marking it as untriaged to get more inputs from dev team.

Thanks...!!
Cc: kenrb@chromium.org wjmaclean@chromium.org mcnee@chromium.org
Thanks for the detailed report!  Since #4 mentioned this is seen since M60, I wouldn't expect it to be due to site isolation which was enabled in M67, but just to confirm, can you check if setting chrome://flags/#site-isolation-trial-opt-out to "Opt out" affects this?

Adding a few folks familiar with zoom and input events for any thoughts.
Labels: -OS-Linux
Touchpad pinch not working over a cross-site iframe should be fixed as of 69.0.3450.0 (  crbug.com/739213#c7  ).

Pinching over the google maps OOPIF works for me on ChromeOS 69.0.3495.0 and on Mac 69.0.3497.0.
We are seeing this same issue in our side, https://web.autocad.com. Given it is a drafting app, this is fairly critical for us. We tried it in Canary on Mac but it is still reproducible. 
Cc: bokan@chromium.org
Owner: chaopeng@chromium.org
Status: Assigned (was: Untriaged)
Chao, since you're actively working on touchpad pinch PTAL.
Mergedinto: 739213
Status: Duplicate (was: Assigned)
Able to reproduce this issue on M68 stable. And can not reproduce on M70 canary. It should be fixed in  crbug.com/739213#c7 .
Chao, did you try the case in #7? Supposedly that still repros in Canary.
Status: Untriaged (was: Duplicate)
I just managed to reproduce this with the reporter's test page by going into the Mac display settings and selecting HiDPI. Then pinching over the google maps frame scales the page rather than being handled by maps.

But this doesn't appear to be specific to touchpad pinch. Other mouse input appears to be broken as well.
Actually, maybe it's not HiDPI, but the size of the google maps frame. I notice that once the frame is small enough the controls on the map disappear and maps stops handling input. This happens both with and without site isolation.
Reporter and c#7:
Does changing the system display settings to be non-HiDPI or resizing the maps iframe to be sufficiently large have any effect?
Does temporarily opting out of chrome://flags/#site-isolation-trial-opt-out have any effect?
Is other mouse/touchpad input not working or just pinch?
Status: Assigned (was: Untriaged)
Cc: chaopeng@chromium.org
Labels: Needs-Feedback
NextAction: 2018-10-16
Owner: mcnee@chromium.org
Reporter and c#7:
Please address c#14.
The NextAction date has arrived: 2018-10-16
Status: Duplicate (was: Assigned)
Considering this a duplicate again.

Sign in to add a comment