Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Panel: Make sure active button class is removed when link to panel is…
Browse files Browse the repository at this point in the history
… a listview button. Fixes #5961.
  • Loading branch information
jaspermdegroot committed May 3, 2013
1 parent b6cfd58 commit 4777ef8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/widgets/panel.js
Expand Up @@ -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 );
Expand Down

0 comments on commit 4777ef8

Please sign in to comment.