From 92cf8d62c4badaa3a9047d6074d623081ffba307 Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 23 Jan 2012 15:33:59 -0500 Subject: [PATCH 1/2] Issue #1524 - Taphold event fired while scrolling on Blackberry Playbook Cause: The vmousecancel event was not being fired for 'this'. How Fixed: Bound vmousecancel event to document instead of 'this'. How Tested: Ran the example provided with the issue (http://jsbin.com/oruhu4/) with this change on BlackBerry Playbook v2.0 and iPad iOS 5.0.1 --- js/jquery.mobile.event.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/jquery.mobile.event.js b/js/jquery.mobile.event.js index d9041748..4b0b9b7e 100644 --- a/js/jquery.mobile.event.js +++ b/js/jquery.mobile.event.js @@ -92,8 +92,8 @@ $.event.special.tap = { clearTapTimer(); $this.unbind( "vclick", clickHandler ) - .unbind( "vmouseup", clearTapTimer ) - .unbind( "vmousecancel", clearTapHandlers ); + .unbind( "vmouseup", clearTapTimer ); + $(document).unbind("vmousecancel", clearTapHandlers); } function clickHandler(event) { @@ -106,9 +106,9 @@ $.event.special.tap = { } } - $this.bind( "vmousecancel", clearTapHandlers ) - .bind( "vmouseup", clearTapTimer ) + $this.bind( "vmouseup", clearTapTimer ) .bind( "vclick", clickHandler ); + $(document).bind("vmousecancel", clearTapHandlers); timer = setTimeout(function() { triggerCustomEvent( thisObject, "taphold", $.Event( "taphold" ) ); From a215d4c13e69c1f435ed7e8ea8c53e1304fe6cce Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 23 Jan 2012 20:00:54 -0500 Subject: [PATCH 2/2] Issue #1524 - Fixing style - Missing white space --- js/jquery.mobile.event.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/jquery.mobile.event.js b/js/jquery.mobile.event.js index 4b0b9b7e..e9c1b512 100644 --- a/js/jquery.mobile.event.js +++ b/js/jquery.mobile.event.js @@ -93,7 +93,7 @@ $.event.special.tap = { $this.unbind( "vclick", clickHandler ) .unbind( "vmouseup", clearTapTimer ); - $(document).unbind("vmousecancel", clearTapHandlers); + $( document ).unbind( "vmousecancel", clearTapHandlers ); } function clickHandler(event) { @@ -108,7 +108,7 @@ $.event.special.tap = { $this.bind( "vmouseup", clearTapTimer ) .bind( "vclick", clickHandler ); - $(document).bind("vmousecancel", clearTapHandlers); + $( document ).bind( "vmousecancel", clearTapHandlers ); timer = setTimeout(function() { triggerCustomEvent( thisObject, "taphold", $.Event( "taphold" ) );