1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-03 02:13:01 +02:00

Use next dropdown menu instead of first of the parent

This commit is contained in:
Martijn Cuppens
2020-02-01 14:56:20 +01:00
parent 85b12549ec
commit 2e150e722a
5 changed files with 98 additions and 48 deletions

View File

@@ -66,6 +66,20 @@ const SelectorEngine = {
previous = previous.previousElementSibling
}
return []
},
next(element, selector) {
let next = element.nextElementSibling
while (next) {
if (this.matches(next, selector)) {
return [next]
}
next = next.nextElementSibling
}
return []
}
}