From a7b0288c1e6fb479608d9886f0c6b19e53fae794 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Fri, 4 Aug 2017 16:06:23 -0400 Subject: [PATCH] Watch for clicks on menus, not items --- source/js/dropdowns.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/js/dropdowns.js b/source/js/dropdowns.js index 08a8231b5..edfd52739 100644 --- a/source/js/dropdowns.js +++ b/source/js/dropdowns.js @@ -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(); }