Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js/src/dom
diff options
context:
space:
mode:
authorMartijn Cuppens <martijn.cuppens@gmail.com>2020-02-01 16:56:20 +0300
committerMartijn Cuppens <martijn.cuppens@gmail.com>2020-03-23 17:35:07 +0300
commit2e150e722a946f20ded62b39abe28f244f6ae050 (patch)
treeb8e23908d7a08583f56367aa5190f68747dd345e /js/src/dom
parent85b12549ecff83f866588394ecff747e69567bc4 (diff)
Use next dropdown menu instead of first of the parent
Diffstat (limited to 'js/src/dom')
-rw-r--r--js/src/dom/selector-engine.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/src/dom/selector-engine.js b/js/src/dom/selector-engine.js
index a8c14ae4c8..c18ec4136f 100644
--- a/js/src/dom/selector-engine.js
+++ b/js/src/dom/selector-engine.js
@@ -67,6 +67,20 @@ const SelectorEngine = {
}
return []
+ },
+
+ next(element, selector) {
+ let next = element.nextElementSibling
+
+ while (next) {
+ if (this.matches(next, selector)) {
+ return [next]
+ }
+
+ next = next.nextElementSibling
+ }
+
+ return []
}
}