Permalink
Browse files

Panel: Only apply active state to button styled links.

  • Loading branch information...
1 parent ab3c819 commit 901586662ae96d1e7a8ec529043f43c978818f5f @jaspermdegroot jaspermdegroot committed Jan 20, 2013
Showing with 6 additions and 4 deletions.
  1. +6 −4 js/widgets/panel.js
View
10 js/widgets/panel.js
@@ -207,10 +207,12 @@ $.widget( "mobile.panel", $.mobile.widget, {
if ( this.href.split( "#" )[ 1 ] === self._panelID && self._panelID !== undefined ) {
e.preventDefault();
var $link = $( this );
- $link.addClass( $.mobile.activeBtnClass );
- self.element.one( "panelopen panelclose", function() {
- $link.removeClass( $.mobile.activeBtnClass );
- });
+ if ( $link.is( ":jqmData(role='button')" ) ) {
+ $link.addClass( $.mobile.activeBtnClass );
+ self.element.one( "panelopen panelclose", function() {
+ $link.removeClass( $.mobile.activeBtnClass );
+ });
+ }
self.toggle();
return false;
}

0 comments on commit 9015866

Please sign in to comment.