diff options
Diffstat (limited to 'vendor/twbs/bootstrap/js/src/dom/selector-engine.js')
-rw-r--r-- | vendor/twbs/bootstrap/js/src/dom/selector-engine.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/vendor/twbs/bootstrap/js/src/dom/selector-engine.js b/vendor/twbs/bootstrap/js/src/dom/selector-engine.js index 381e45fe8..9fc0e4b0e 100644 --- a/vendor/twbs/bootstrap/js/src/dom/selector-engine.js +++ b/vendor/twbs/bootstrap/js/src/dom/selector-engine.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.2): dom/selector-engine.js + * Bootstrap (v5.1.2): dom/selector-engine.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -11,6 +11,8 @@ * ------------------------------------------------------------------------ */ +import { isDisabled, isVisible } from '../util/index' + const NODE_TEXT = 3 const SelectorEngine = { @@ -69,6 +71,21 @@ const SelectorEngine = { } return [] + }, + + focusableChildren(element) { + const focusables = [ + 'a', + 'button', + 'input', + 'textarea', + 'select', + 'details', + '[tabindex]', + '[contenteditable="true"]' + ].map(selector => `${selector}:not([tabindex^="-"])`).join(', ') + + return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el)) } } |