From bd77b6db5290caf7f79c397a15dc77337fd534eb Mon Sep 17 00:00:00 2001 From: Przemyslaw Ciezkowski Date: Mon, 24 Jun 2013 14:05:38 +0200 Subject: [PATCH] Collapsible: remove activeBtnClass from collapsible heading Click and vmousecancel are not always triggered after vclick (vmouse events don't work the same way as native browser blick event). This patch adds activeBtnClass on vmousedown event and removes it on vmouseup or vmousecancel. This way this class will be always removed. Fixes #N_SE-36385 Change-Id: I2031698eff61643850867179bf3174d2c65f78fb --- ...-remove-ui-btn-active-class-when-expand-c.patch | 24 +++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/libs/patch/0048-Collapsible-remove-ui-btn-active-class-when-expand-c.patch b/libs/patch/0048-Collapsible-remove-ui-btn-active-class-when-expand-c.patch index 035520a..a5e367c 100644 --- a/libs/patch/0048-Collapsible-remove-ui-btn-active-class-when-expand-c.patch +++ b/libs/patch/0048-Collapsible-remove-ui-btn-active-class-when-expand-c.patch @@ -1,4 +1,4 @@ -From 33ba869404135065a233af08bc1eaca05f435268 Mon Sep 17 00:00:00 2001 +From 7d2642d5f8a5a714163c7614581c28950e58fe44 Mon Sep 17 00:00:00 2001 From: Przemyslaw Ciezkowski Date: Wed, 12 Jun 2013 11:15:52 +0200 Subject: [PATCH] Collapsible: remove ui-btn-active class when expand/collapse @@ -6,22 +6,32 @@ Subject: [PATCH] Collapsible: remove ui-btn-active class when expand/collapse Change-Id: Icb8772fa56461ef43e735b72545f0e27a335ff34 --- - .../jquery-mobile-1.2.0/js/widgets/collapsible.js | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) + .../jquery-mobile-1.2.0/js/widgets/collapsible.js | 8 +++++--- + 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/js/jquery-mobile-1.2.0/js/widgets/collapsible.js b/libs/js/jquery-mobile-1.2.0/js/widgets/collapsible.js -index 8398de4..eee244e 100644 +index 8398de4..cb0225b 100644 --- a/libs/js/jquery-mobile-1.2.0/js/widgets/collapsible.js +++ b/libs/js/jquery-mobile-1.2.0/js/widgets/collapsible.js -@@ -153,9 +153,12 @@ $.widget( "mobile.collapsible", $.mobile.widget, { +@@ -134,8 +134,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, { + .toggleClass( "ui-icon-" + expandedIcon, !isCollapse ) + // logic or cause same icon for expanded/collapsed state would remove the ui-icon-class + .toggleClass( "ui-icon-" + collapsedIcon, ( isCollapse || expandedIcon === collapsedIcon ) ) +- .end() +- .find( "a" ).first().removeClass( $.mobile.activeBtnClass ); ++ .end(); + + $this.toggleClass( "ui-collapsible-collapsed", isCollapse ); + collapsibleContent.toggleClass( "ui-collapsible-content-collapsed", isCollapse ).attr( "aria-hidden", isCollapse ); +@@ -153,9 +152,12 @@ $.widget( "mobile.collapsible", $.mobile.widget, { .trigger( o.collapsed ? "collapse" : "expand" ); collapsibleHeading - .bind( "tap", function( event ) { -+ .bind( "tap", function() { ++ .bind( "vmousedown", function() { collapsibleHeading.find( "a" ).first().addClass( $.mobile.activeBtnClass ); }) -+ .bind( "vmousecancel", function() { ++ .bind( "vmousecancel vmouseup", function() { + collapsibleHeading.find( "a" ).first().removeClass( $.mobile.activeBtnClass ); + }) .bind( "click", function( event ) { -- 2.7.4