PDF viewer: pinch zoom invokes native browser zoom due to uncancellable touchmove event |
|||||
Issue descriptionChrome Version: 64.0.3271.0 What steps will reproduce the problem? (1) Touch scroll a PDF. (2) During the scroll, place a second finger on the screen and immediately pinch. When we try to preventDefault the touchmove in order to prevent the browser's native pinch zoom, we get the following intervention: gesture_detector.js:137 [Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted. onTouch_ @ gesture_detector.js:137 Since the event could not be cancelled, the browser's native pinch zoom is invoked.
,
Nov 17 2017
,
Nov 17 2017
So it looks like touch-action doesn't currently prevent pinching if the gesture started as a scroll.
,
Sep 26
The workaround at https://chromium-review.googlesource.com/c/chromium/src/+/1040354 also applies to this case, so we aren't blocked on 771330 anymore. I'll switch the viewer over to touch-action.
,
Oct 2
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bb2f75c1874be503a1468688bf0510d01be50b49 commit bb2f75c1874be503a1468688bf0510d01be50b49 Author: Kevin McNee <mcnee@chromium.org> Date: Tue Oct 02 21:59:48 2018 PDF Viewer: Use touch-action to disable native pinch zoom We currently call preventDefault on two finger touchmoves to prevent the browser's native pinch zoom from interfering with the PDF viewer's own pinch zoom implementation. However, an intervention may prevent such an event from being cancelable. It also doesn't consider the case of touchscreen double-tap on Chrome OS in tablet mode. touch-action is now able to prevent touchscreen pinches in an OOPIF/BrowserPlugin, so we now use touch-action for the viewer. Bug: 786419 Change-Id: I4eeb3be4566db3c48f0b2ad461cafe0568379fe1 Reviewed-on: https://chromium-review.googlesource.com/c/1247040 Reviewed-by: David Bokan <bokan@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Kevin McNee <mcnee@chromium.org> Cr-Commit-Position: refs/heads/master@{#595997} [modify] https://crrev.com/bb2f75c1874be503a1468688bf0510d01be50b49/chrome/browser/resources/pdf/gesture_detector.js [modify] https://crrev.com/bb2f75c1874be503a1468688bf0510d01be50b49/chrome/browser/resources/pdf/index.css [modify] https://crrev.com/bb2f75c1874be503a1468688bf0510d01be50b49/chrome/test/data/pdf/gesture_detector_test.js
,
Oct 11
,
Nov 27
Just wondering when this fix can be expected to be merged into a dev channel?
,
Nov 27
It's in 71.0.3569.0 and newer, so it's already in the current Beta and Dev channels. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by mcnee@chromium.org
, Nov 17 2017