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

Commit 85b11b5

Browse files
Panel: Make sure active button class is removed when link to panel is a listview button. Fixes #5961.
1 parent 569ea47 commit 85b11b5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

js/widgets/panel.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,11 @@ $.widget( "mobile.panel", $.mobile.widget, {
222222
e.preventDefault();
223223
var $link = $( this );
224224
if ( ! $link.hasClass( "ui-link" ) ) {
225+
// Check if we are in a listview
226+
var $parent = $link.parent().parent();
227+
if ( $parent.hasClass( "ui-li" ) ) {
228+
$link = $parent.parent();
229+
}
225230
$link.addClass( $.mobile.activeBtnClass );
226231
self.element.one( "panelopen panelclose", function() {
227232
$link.removeClass( $.mobile.activeBtnClass );

0 commit comments

Comments
 (0)