[Webkit-unassigned] [Bug 138151] New: Can't reliably detect tap from JavaScript
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 28 15:03:57 PDT 2014
https://bugs.webkit.org/show_bug.cgi?id=138151
Bug ID: 138151
Summary: Can't reliably detect tap from JavaScript
Classification: Unclassified
Product: WebKit
Version: 528+ (Nightly build)
Hardware: Unspecified
OS: iOS 7.0
Status: NEW
Severity: Normal
Priority: P2
Component: Event Handling
Assignee: webkit-unassigned at lists.webkit.org
Reporter: rbyers at chromium.org
JS libraries may want to detect a tap without using the 'click' event - for example in order to work around the 300ms click delay.
Typically the guidance is something like "look for a touchstart, followed by 0 or more touchmove events that don't move beyond N pixels from the touchstart, then a touchend". The problem with this is that there's no reliable way to determine the value for 'N'. If you choose too low than it may be too hard to trigger a tap (compared to the browser's default behavior). If you choose a value that's too large then you may detect a tap when the browser triggers scrolling. Since the ideal value can change across different devices / versions of iOS, web code can be brittle to iOS gesture detection changes.
The same problem applies when trying to write code which consumes touch events in one axis but not the other (eg. a horizontal image carousel on a vertically scrolling page).
The problem is a little easier in Chromium due to a touchmove suppressing hack we've got - see https://docs.google.com/a/chromium.org/document/d/12k_LL_Ot9GjF8zGWP9eI_3IMbSizD72susba0frg44Y/edit#heading=h.vluzqx9pk2bm. But if we can agree on an API to let pages do this properly, I'd ideally like to change chromium's behavior to match Safari's here (suppressing touchmove events is potentially evil).
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141028/ef5cb24d/attachment-0002.html>
More information about the webkit-unassigned
mailing list