Unverified Commit 9d05a12a authored by lauriii's avatar lauriii
Browse files

Issue #3211897 by mherchel, Gauravmahlawat: Olivero: On mobile width, submenu...

Issue #3211897 by mherchel, Gauravmahlawat: Olivero: On mobile width, submenu can unintendedly close when user attempts to scroll on mobile
parent 8f711d9d
......@@ -166,9 +166,7 @@
(e) => {
if (
areAnySubNavsOpen() &&
!e.target.matches(
'.primary-nav__menu-item--has-children, .primary-nav__menu-item--has-children *',
)
!e.target.matches('.header-nav, .header-nav *')
) {
closeAllSubNav();
}
......
......@@ -103,7 +103,7 @@
}
});
document.addEventListener('touchstart', function (e) {
if (areAnySubNavsOpen() && !e.target.matches('.primary-nav__menu-item--has-children, .primary-nav__menu-item--has-children *')) {
if (areAnySubNavsOpen() && !e.target.matches('.header-nav, .header-nav *')) {
closeAllSubNav();
}
}, {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment