1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-07 06:06:47 +02:00

Dropdown: Remove static method used once

This commit is contained in:
GeoSot
2021-10-10 14:59:12 +03:00
committed by XhmikosR
parent 8b308b76f0
commit 137b324930

View File

@@ -132,7 +132,7 @@ class Dropdown extends BaseComponent {
return return
} }
const parent = Dropdown.getParentFromElement(this._element) const parent = getElementFromSelector(this._element) || this._element.parentNode
// Totally disable Popper for Dropdowns in Navbar // Totally disable Popper for Dropdowns in Navbar
if (this._inNavbar) { if (this._inNavbar) {
Manipulator.setDataAttribute(this._menu, 'popper', 'none') Manipulator.setDataAttribute(this._menu, 'popper', 'none')
@@ -408,10 +408,6 @@ class Dropdown extends BaseComponent {
} }
} }
static getParentFromElement(element) {
return getElementFromSelector(element) || element.parentNode
}
static dataApiKeydownHandler(event) { static dataApiKeydownHandler(event) {
// If not input/textarea: // If not input/textarea:
// - And not a key in REGEXP_KEYDOWN => not a dropdown command // - And not a key in REGEXP_KEYDOWN => not a dropdown command