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

Commit 4777ef8

Browse files
Panel: Make sure active button class is removed when link to panel is a listview button. Fixes #5961.
1 parent b6cfd58 commit 4777ef8

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
@@ -223,6 +223,11 @@ $.widget( "mobile.panel", $.mobile.widget, {
223223
e.preventDefault();
224224
var $link = $( this );
225225
if ( ! $link.hasClass( "ui-link" ) ) {
226+
// Check if we are in a listview
227+
var $parent = $link.parent().parent();
228+
if ( $parent.hasClass( "ui-li" ) ) {
229+
$link = $parent.parent();
230+
}
226231
$link.addClass( $.mobile.activeBtnClass );
227232
self.element.one( "panelopen panelclose", function() {
228233
$link.removeClass( $.mobile.activeBtnClass );

0 commit comments

Comments
 (0)