aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/js/src/dropdown.js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-11 18:18:57 +0000
committerMario <mario@mariovavti.com>2022-10-11 18:18:57 +0000
commit5e5f0aa955d86743a14531bed98501b59140ab1f (patch)
treef8a7bbff876adf28d03cc005b8e0a0602886ffc8 /vendor/twbs/bootstrap/js/src/dropdown.js
parentf9a4c53e3feb07e5319b110b25b4746ae839c420 (diff)
downloadvolse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.tar.gz
volse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.tar.bz2
volse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.zip
update composer libs
Diffstat (limited to 'vendor/twbs/bootstrap/js/src/dropdown.js')
-rw-r--r--vendor/twbs/bootstrap/js/src/dropdown.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/vendor/twbs/bootstrap/js/src/dropdown.js b/vendor/twbs/bootstrap/js/src/dropdown.js
index 601792953..b05d92cf7 100644
--- a/vendor/twbs/bootstrap/js/src/dropdown.js
+++ b/vendor/twbs/bootstrap/js/src/dropdown.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.2.0): dropdown.js
+ * Bootstrap (v5.2.2): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -95,7 +95,10 @@ class Dropdown extends BaseComponent {
this._popper = null
this._parent = this._element.parentNode // dropdown wrapper
- this._menu = SelectorEngine.findOne(SELECTOR_MENU, this._parent)
+ // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
+ this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] ||
+ SelectorEngine.prev(this._element, SELECTOR_MENU)[0] ||
+ SelectorEngine.findOne(SELECTOR_MENU, this._parent)
this._inNavbar = this._detectNavbar()
}
@@ -405,7 +408,13 @@ class Dropdown extends BaseComponent {
event.preventDefault()
- const getToggleButton = SelectorEngine.findOne(SELECTOR_DATA_TOGGLE, event.delegateTarget.parentNode)
+ // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
+ const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE) ?
+ this :
+ (SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0] ||
+ SelectorEngine.next(this, SELECTOR_DATA_TOGGLE)[0] ||
+ SelectorEngine.findOne(SELECTOR_DATA_TOGGLE, event.delegateTarget.parentNode))
+
const instance = Dropdown.getOrCreateInstance(getToggleButton)
if (isUpOrDownEvent) {