From 2b513556560bb9ae52ad4da015c0d36038ded3ff Mon Sep 17 00:00:00 2001 From: Kin Blas Date: Wed, 29 Jun 2011 17:38:00 -0700 Subject: [PATCH] Switch back to processing link clicks on the "click" event. It really is the only reliable way across all the devices we support. Also, remove all references to useFastClick. --- docs/api/globalconfig.html | 3 --- js/jquery.mobile.core.js | 5 ----- js/jquery.mobile.navigation.js | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/api/globalconfig.html b/docs/api/globalconfig.html index d5dd66902c1..03ee3553583 100755 --- a/docs/api/globalconfig.html +++ b/docs/api/globalconfig.html @@ -98,9 +98,6 @@

Configurable options

ajaxEnabled (boolean, default: true):
jQuery Mobile will automatically handle link clicks and form submissions through Ajax, when possible. If false, url hash listening will be disabled as well, and urls will load as regular http requests.
- -
useFastClick (boolean, default: true):
-
When handling clicks and taps automatically with Ajax, this option will use jQuery Mobile's vclick event, enabling page changes to happen slightly sooner on devices that support touch events, and keeping the address bar hidden during page transtions. When disabled, the automatied Ajax handling will use an ordinary click event instead. This option has no effect on non-touch devices, but when enabled, it may interfere with jQuery plugins that bind to click events rather than vclick events.
hashListeningEnabled (boolean, default: true):
diff --git a/js/jquery.mobile.core.js b/js/jquery.mobile.core.js index 4f4a5ad9f6d..4fe4ab52125 100644 --- a/js/jquery.mobile.core.js +++ b/js/jquery.mobile.core.js @@ -33,11 +33,6 @@ // Automatically handle clicks and form submissions through Ajax, when same-domain ajaxEnabled: true, - // When enabled, clicks and taps that result in Ajax page changes will happen slightly sooner on touch devices. - // Also, it will prevent the address bar from appearing on platforms like iOS during page transitions. - // This option has no effect on non-touch devices, but enabling it may interfere with jQuery plugins that bind to click events - useFastClick: true, - // Automatically load and show pages based on location.hash hashListeningEnabled: true, diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 974d6bf6fc3..27c41b0d3ce 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -1019,7 +1019,7 @@ }); // click routing - direct to HTTP or Ajax, accordingly - $( document ).bind( $.mobile.useFastClick ? "vclick" : "click", function( event ) { + $( document ).bind( "click", function( event ) { var link = findClosestLink( event.target ); if ( !link ) { return;