Permalink
Browse files

Panel: Make sure active button class is removed when link to panel is…

… a listview button. Fixes #5961.
  • Loading branch information...
jaspermdegroot committed May 3, 2013
1 parent 569ea47 commit 85b11b5fe797a82ec4ba63d59bde80a9747915a7
Showing with 5 additions and 0 deletions.
  1. +5 −0 js/widgets/panel.js
View
@@ -222,6 +222,11 @@ $.widget( "mobile.panel", $.mobile.widget, {
e.preventDefault();
var $link = $( this );
if ( ! $link.hasClass( "ui-link" ) ) {
// Check if we are in a listview
var $parent = $link.parent().parent();
if ( $parent.hasClass( "ui-li" ) ) {
$link = $parent.parent();
}
$link.addClass( $.mobile.activeBtnClass );
self.element.one( "panelopen panelclose", function() {
$link.removeClass( $.mobile.activeBtnClass );

0 comments on commit 85b11b5

Please sign in to comment.