From: Youmin Ha Date: Wed, 16 Jan 2013 14:09:16 +0000 (+0900) Subject: JQM: Fix buttonmarkup bug keeping ui-btn-down class X-Git-Tag: accepted/tizen_2.1/20130425.023924~7^2~224 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb3fd7d37bf7bdbd22a886a9abe6147bb6bab6eb;p=platform%2Fframework%2Fweb%2Fweb-ui-fw.git JQM: Fix buttonmarkup bug keeping ui-btn-down class In multi-touch devices, browsers receive multiple touch events at same time, but there are some abnormal cases that JQM does not handle. * 'touchcancel' When a button is long-pressed, some browsers fire 'touchcancel' event and show some browser menu popup. In this case, the button still has 'ui-btn-down-*' class, which make button seem to be pressed. NOTE: Tizen browser does not fire 'touchcancel'! * 'touchend' but no 'vmouseup' When a button and the other element are touched together almost same time(from button to other element, with slight time gap), the 'touchend' event is fired to the button, but 'vmouseup' does not fired sometimes. But JQM does handle only 'vmouseup', so the 'ui-btn-down-*' class is still remained. (It may be caused by JQM vmouse* event bug.) This JQM patch adds two events, 'touchcancel' and 'touchend' to replace 'ui-btn-down-*' class to 'ui-btn-up-*'. Tested on Tizen target and emulator. Fix N_SE-19155. Change-Id: I409a01c468edbd2a813c8199480a421e8794d941 --- diff --git a/libs/patch/0026-JQM-Fix-buttonmarkup-bug-keeping-ui-btn-down-class.patch b/libs/patch/0026-JQM-Fix-buttonmarkup-bug-keeping-ui-btn-down-class.patch new file mode 100644 index 0000000..2cc7988 --- /dev/null +++ b/libs/patch/0026-JQM-Fix-buttonmarkup-bug-keeping-ui-btn-down-class.patch @@ -0,0 +1,35 @@ +From 5b8a6da21b3c26ca1b2ee6f9c511d8ee5ff1e3db Mon Sep 17 00:00:00 2001 +From: Youmin Ha +Date: Wed, 16 Jan 2013 23:07:12 +0900 +Subject: [PATCH] JQM: Fix buttonmarkup bug keeping ui-btn-down class + +Signed-off-by: Youmin Ha +--- + .../js/jquery.mobile.buttonMarkup.js | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.buttonMarkup.js b/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.buttonMarkup.js +index e043b10..1794b0b 100644 +--- a/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.buttonMarkup.js ++++ b/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.buttonMarkup.js +@@ -250,7 +250,7 @@ var attachEvents = function() { + var hoverDelay = $.mobile.buttonMarkup.hoverDelay, hov, foc; + + $( document ).bind( { +- "vmousedown vmousecancel vmouseup vmouseover vmouseout focus blur scrollstart": function( event ) { ++ "vmousedown vmousecancel vmouseup vmouseover vmouseout focus blur scrollstart touchend touchcancel": function( event ) { + var theme, + $btn = $( closestEnabledButton( event.target ) ), + isTouchEvent = event.originalEvent && /^touch/.test( event.originalEvent.type ), +@@ -268,7 +268,7 @@ var attachEvents = function() { + } else { + $btn.removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-down-" + theme ); + } +- } else if ( evt === "vmousecancel" || evt === "vmouseup" ) { ++ } else if ( evt === "vmousecancel" || evt === "vmouseup" || evt === "touchend" || evt === "touchcancel" ) { + $btn.removeClass( "ui-btn-down-" + theme ).addClass( "ui-btn-up-" + theme ); + } else if ( evt === "vmouseover" || evt === "focus" ) { + if ( isTouchEvent ) { +-- +1.7.9.5 +