Skip to content

Commit

Permalink
Menu: Fix nav collapse click 2 times on no-touch device
Browse files Browse the repository at this point in the history
  • Loading branch information
joomlart committed Mar 21, 2013
1 parent b473048 commit 0b09ec4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/plg_system_t3/base/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@
$('ul.nav').has('.dropdown-menu').touchmenu();
} else {
$(document.body).on('click', '[data-toggle="dropdown"]' ,function(){
if($(this).parent().hasClass('open') && this.href && this.href != '#'){
//if this link has 'open' (second click) class or when we are in collapsed menu and have always-show
if($(this).parent().hasClass('open') && this.href && this.href != '#' ||
($('.btn-navbar').is(':visible') && $(this).closest('.always-show').length)){
window.location.href = this.href;
}
});
Expand Down

0 comments on commit 0b09ec4

Please sign in to comment.