From 287af0ecc2ace8149e3c61dbda43fc9464f0a96e Mon Sep 17 00:00:00 2001 From: blake Date: Wed, 18 Feb 2026 16:09:48 -0600 Subject: [PATCH] Fixed a bug where clicking Services in the mobile navigation would immediately close the window. --- script.js | 2 ++ services/drone/index.html | 2 +- services/ecommerce/index.html | 2 +- services/support/index.html | 2 +- services/web-design/index.html | 2 +- services/web-development/index.html | 2 +- services/web-hosting/index.html | 2 +- 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/script.js b/script.js index fcd0f47..b715b8d 100644 --- a/script.js +++ b/script.js @@ -12,6 +12,8 @@ const navLinks = document.querySelectorAll(".main-nav-link"); navLinks.forEach((link) => { link.addEventListener("click", () => { + const isMobile = window.matchMedia("(max-width: 63em)").matches; + if (isMobile && link.closest(".nav-item-dropdown")) return; headerEl.classList.remove("nav-open"); }); }); diff --git a/services/drone/index.html b/services/drone/index.html index 5087957..88e5d14 100644 --- a/services/drone/index.html +++ b/services/drone/index.html @@ -41,7 +41,7 @@
  • About
  • Contact