Treat long-press gesture as a user activation |
|||
Issue descriptionCurrently a web app cannot call navigator.vibrate() on a long-press because Chromium doesn't treat a long-press as a user activation. As a result, it is impossible for a web app to match native Android/iOS behavior. This came up from a web developer recently in Issue 829145 #c6. If the long-press is considered a user gesture, a web app can vibrate the device through a "contextmenu" handler. It seems there is no good reason not to support this use case. Repro: https://output.jsbin.com/bonadab (Works in Firefox. Not applicable for Edge, doesn't seem to support vibration.)
,
May 2 2018
,
May 2 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8a2c87fe16f3a18504c98c48250765a608b82e87 commit 8a2c87fe16f3a18504c98c48250765a608b82e87 Author: Mustaq Ahmed <mustaq@google.com> Date: Wed May 02 17:23:21 2018 Treat long-press gesture as a user activation. Also add a web-platform-test for this change, which is already supported by Firefox. Intent to ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/-2AyrUFwXvY/Q_wCUmKSAgAJ Spec change PR: https://github.com/whatwg/html/pull/3659 Bug: 836401 Change-Id: Ia710190857211684ce5ce7d4ff835b874f658b29 Reviewed-on: https://chromium-review.googlesource.com/1039265 Reviewed-by: Dave Tapuska <dtapuska@chromium.org> Commit-Queue: Mustaq Ahmed <mustaq@chromium.org> Cr-Commit-Position: refs/heads/master@{#555450} [add] https://crrev.com/8a2c87fe16f3a18504c98c48250765a608b82e87/third_party/WebKit/LayoutTests/external/wpt/html/user-activation/activation-thru-contextmenu-event-manual.html [add] https://crrev.com/8a2c87fe16f3a18504c98c48250765a608b82e87/third_party/WebKit/LayoutTests/external/wpt_automation/html/user-activation/activation-thru-contextmenu-event-manual-automation.js [modify] https://crrev.com/8a2c87fe16f3a18504c98c48250765a608b82e87/third_party/blink/renderer/core/input/gesture_manager.cc
,
May 2 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by mustaq@chromium.org
, Apr 24 2018