Permalink
Browse files

Modified the vclick handler code in navgation.js so that it doesn't p…

…lace the ui-btn-active class on any links meant for interactivity.

Removed the return false in the vclick handler of collapsible and replaced it with a preventDefault(). The only reason we were returning false was to stopPropagation() so that the vclick handler in navigation.js  didn't place a ui-btn-active on it.
  • Loading branch information...
1 parent 2d2e6d7 commit f7749504b8f2f94f084e732411dbd80d8ae9946e @jblas jblas committed Apr 22, 2011
Showing with 6 additions and 2 deletions.
  1. +2 −1 js/jquery.mobile.collapsible.js
  2. +4 −1 js/jquery.mobile.navigation.js
@@ -122,6 +122,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
.trigger( "collapse" );
});
+
var set = collapsibleParent.find( ":jqmData(role=collapsible)" )
set.first()
@@ -141,7 +142,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
else {
collapsibleContain.trigger('collapse');
}
- return false;
+ e.preventDefault();
});
}
});
@@ -730,7 +730,10 @@
$( document).bind( "vclick", function(event){
var link = findClosestLink(event.target);
if (link){
- $(link).closest( ".ui-btn" ).not( ".ui-disabled" ).addClass( $.mobile.activeBtnClass );
+ var url = path.clean(link.getAttribute("href") || "#");
+ if (url !== "#" && url.replace(path.get(), "") !== "#"){
+ $(link).closest( ".ui-btn" ).not( ".ui-disabled" ).addClass( $.mobile.activeBtnClass );
+ }
}
});

0 comments on commit f774950

Please sign in to comment.