]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
use classList `add` instead of `toggle` on show
authorGeoSot <geo.sotis@gmail.com>
Thu, 8 Jul 2021 14:54:15 +0000 (17:54 +0300)
committerXhmikosR <xhmikosr@gmail.com>
Thu, 22 Jul 2021 14:54:48 +0000 (17:54 +0300)
js/src/dropdown.js

index be561b12822d02036a56dc6b8c6a074506fae140..1e0029a60f978b380a5b64d97980a85c082cf627 100644 (file)
@@ -184,8 +184,8 @@ class Dropdown extends BaseComponent {
     this._element.focus()
     this._element.setAttribute('aria-expanded', true)
 
-    this._menu.classList.toggle(CLASS_NAME_SHOW)
-    this._element.classList.toggle(CLASS_NAME_SHOW)
+    this._menu.classList.add(CLASS_NAME_SHOW)
+    this._element.classList.add(CLASS_NAME_SHOW)
     EventHandler.trigger(this._element, EVENT_SHOWN, relatedTarget)
   }