0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-18 10:52:19 +01:00

Change toggle method to remove

Since the class `.show` must be removed
This commit is contained in:
Rohit Sharma 2021-04-14 15:27:33 +05:30 committed by XhmikosR
parent bce4684d34
commit 7eadf73f03

View 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)