W3C home > Mailing lists > Public > public-pointer-events@w3.org > April to June 2014

RFE: Add touch-callout

From: Daniel Trebbien <dtrebbien@gmail.com>
Date: Fri, 13 Jun 2014 08:19:13 -0400
Message-ID: <CABrgu5S_nLZaxQ0ZPvGQmw6eocdEQ=dUuT3pQu16aCdDgZzoeA@mail.gmail.com>
To: public-pointer-events@w3.org

In mobile browsers, when the user touches and holds a link or <img>, a
popup is shown containing options for the user.  For example, touching and
holding an <img>, Mobile Safari, Chrome for Android, and Android
WebView/AOSP Browser all display a "Save Image" option in this popup.  In
certain cases, it makes sense to disable this popup, such as when an <img>
is used in the design of a webpage.

Mobile Safari supports a property, -webkit-touch-callout, that can be used
to disable this popup:
.. and unlike other -webkit-prefixed properties, this is specific to Mobile
Safari; I have tested and found that it is not supported by Android WebView
or Chrome for Android.

To disable the popup on Android, the current approach is to
preventDefault() touch events on the element:
However, this has the side-effect that a native touch scroll starting on
the image will no longer work.

Chrome 36+ will support the Pointer Events touch-action property:
I have tested Chrome 36 Beta for Android and found that touch-action:none
does not disable the callout popup, and leads to the unwanted side-effect
of breaking touch scrolling.

I have not tested IE Mobile because I do not have access to a Windows
Phone, but presumably the need for a touch-callout-equivalent is there,
too, as people are asking for an equivalent to -webkit-touch-callout on
Stack Overflow:

It would be immensely useful if touch-callout were added to the Pointer
Events spec.  Could this property be added?
Received on Friday, 13 June 2014 12:26:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:20:26 UTC