Permalink
Browse files

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

… a listview button. Fixes #5961.
  • Loading branch information...
1 parent b6cfd58 commit 4777ef8d6ae94a139d94c4fb3aaf8f30f94d3ce8 @jaspermdegroot jaspermdegroot committed May 3, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 js/widgets/panel.js
View
@@ -223,6 +223,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 4777ef8

Please sign in to comment.