Skip to content

Loading…

Opening popup from within a listview does not restore button state #5145

Merged
merged 1 commit into from

3 participants

@jerone

When I open a popup from within a listview, the button is always marked as active.
The code to restore this does not check if the button is inside a listview.

@MauriceG

Related issue #4611

@gabrielschulhof gabrielschulhof merged commit 6b468df into jquery:master
@MauriceG

@jerone good job, thanks! - @gabrielschulhof Thanks for take this in!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 9, 2012
  1. @jerone
Showing with 5 additions and 0 deletions.
  1. +5 −0 js/widgets/popup.js
View
5 js/widgets/popup.js
@@ -786,6 +786,11 @@ define( [ "jquery",
//remove after delay
setTimeout( function() {
+ // Check if we are in a listview
+ var $parent = $link.parent().parent();
+ if ($parent.hasClass("ui-li")) {
+ $link = $parent.parent();
+ }
$link.removeClass( $.mobile.activeBtnClass );
}, 300 );
};
Something went wrong with that request. Please try again.