touch-event-mode

The touch-event-mode meta tag is used to define how the browser handles touch events on devices with a touch screen. This meta tag is supported as of BlackBerry 7.

This meta tag has the following associated directives:

Directive

Description

native

Indicates that all touch events should be passed directly to the web page, without being processed by the browser UI. This directive disables the UI features that would normally consume touch events. Because touch events are passed directly to the web page without UI intervention, event lag is considerably reduced, allowing you to create content that requires fast, repetitive or complex multi-touch input.

A value of native disables the following UI features:

  • Double tap to zoom into a content block
  • Touch and hold to display the context menu
  • Two finger text selection activation on tap and hover
  • Conversion from touch events into mouse events
  • Automatic target correction
  • Scrolling, including subframe scrolling
  • Pinch-to-zoom behavior

pure-with-mouse-conversion

Indicates that some touch events should be passed directly to the web page, while others will be converted into a corresponding mouse event. This directive allows you to blend handling pure touch events with standard web content behavior, as mouse event conversion allows users to interact with standard form controls and links as they would on a desktop browser, and allows user to scroll a page.

If necessary, you can pre-empt the conversion to mouse events where necessary by calling the preventDefault() method. This method will disable event conversion and pass the raw touch event directly to the web page.

  • Touch and hold to display the context menu
  • Two finger text selection activation on tap and hover

processed

Indicates that the browser will use the default event handling, that is, that no UI features are disabled.

Last modified: 2014-03-10



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus