Watch for clicks on menus, not items

This commit is contained in:
Cory LaViska
2017-08-04 16:06:23 -04:00
parent 91e6d4f47b
commit a7b0288c1e

View File

@@ -57,8 +57,8 @@ if(typeof jQuery === 'undefined') {
.toggleClass('active')
.trigger($(dropdown).is('.active') ? 'show' : 'hide');
} else {
// Don't scroll the page when clicking on dropdown items
if($(event.target).is('.dropdown-menu a')) {
// Don't scroll the page when clicking on dropdown menu items
if($(event.target).parents().addBack().is('.dropdown-menu')) {
event.preventDefault();
}