Explorar o código

fix: Fix issue #1037 (#1039)

Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
JY Hsu hai 2 meses
pai
achega
f329b3f2cb
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      assets/scripts/sections/navbar.js

+ 2 - 1
assets/scripts/sections/navbar.js

@@ -54,8 +54,9 @@ document.addEventListener('DOMContentLoaded', function () {
   const navMain = document.getElementsByClassName('navbar-collapse')
   Array.from(navMain).forEach(function (el) {
     el.addEventListener('click', function (e) {
-      if (e.target.tagName === 'A') {
+      if (e.target.tagName === 'A' && !e.target.classList.contains("dropdown-toggle")) {
         el.classList.add('collapse')
+        el.classList.remove('show')
       }
     })
   })