]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Dropdown: Remove static method used once
authorGeoSot <geo.sotis@gmail.com>
Sun, 10 Oct 2021 11:59:12 +0000 (14:59 +0300)
committerXhmikosR <xhmikosr@gmail.com>
Wed, 1 Dec 2021 15:10:39 +0000 (17:10 +0200)
js/src/dropdown.js

index 6129707e26277db12fb7464415a1e374cafc19f5..06f69af7be02b4646349d442d0f56267c4516fcc 100644 (file)
@@ -132,7 +132,7 @@ class Dropdown extends BaseComponent {
       return
     }
 
-    const parent = Dropdown.getParentFromElement(this._element)
+    const parent = getElementFromSelector(this._element) || this._element.parentNode
     // Totally disable Popper for Dropdowns in Navbar
     if (this._inNavbar) {
       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) {
     // If not input/textarea:
     //  - And not a key in REGEXP_KEYDOWN => not a dropdown command