]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Change `toggle` method to `remove`
authorRohit Sharma <rohit2sharma95@gmail.com>
Wed, 14 Apr 2021 09:57:33 +0000 (15:27 +0530)
committerXhmikosR <xhmikosr@gmail.com>
Sun, 18 Apr 2021 05:47:50 +0000 (08:47 +0300)
Since the class `.show` must be removed

js/src/dropdown.js

index dac7368c270e82b68a62dfe7db5877b4742a194c..c314cbcddfbc448bbd041fc8e3a9fa3dd070dc4c 100644 (file)
@@ -259,8 +259,8 @@ class Dropdown extends BaseComponent {
       this._popper.destroy()
     }
 
-    this._menu.classList.toggle(CLASS_NAME_SHOW)
-    this._element.classList.toggle(CLASS_NAME_SHOW)
+    this._menu.classList.remove(CLASS_NAME_SHOW)
+    this._element.classList.remove(CLASS_NAME_SHOW)
     this._element.setAttribute('aria-expanded', 'false')
     Manipulator.removeDataAttribute(this._menu, 'popper')
     EventHandler.trigger(this._element, EVENT_HIDDEN, relatedTarget)