diff options
author | Mario <mario@mariovavti.com> | 2023-11-25 17:12:28 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-11-25 17:12:28 +0100 |
commit | 0fd8e02a884a2b040dca62ab5d9674db5f6a070b (patch) | |
tree | 586ee43f32f6f14368c09026f21dcd3244ea24b6 /vendor/twbs/bootstrap/dist/js/bootstrap.js | |
parent | 82e704ec5b107823c09f1387e9091adee53a4c2d (diff) | |
parent | 55c4bfb67009c598f25b1a8189604bfffa73dfbb (diff) | |
download | volse-hubzilla-8.8.tar.gz volse-hubzilla-8.8.tar.bz2 volse-hubzilla-8.8.zip |
Merge branch '8.8RC'8.8
Diffstat (limited to 'vendor/twbs/bootstrap/dist/js/bootstrap.js')
-rw-r--r-- | vendor/twbs/bootstrap/dist/js/bootstrap.js | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/vendor/twbs/bootstrap/dist/js/bootstrap.js b/vendor/twbs/bootstrap/dist/js/bootstrap.js index 8fb957a89..d861a3269 100644 --- a/vendor/twbs/bootstrap/dist/js/bootstrap.js +++ b/vendor/twbs/bootstrap/dist/js/bootstrap.js @@ -1,5 +1,5 @@ /*! - * Bootstrap v5.3.0 (https://getbootstrap.com/) + * Bootstrap v5.3.2 (https://getbootstrap.com/) * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ @@ -667,7 +667,7 @@ * Constants */ - const VERSION = '5.3.0'; + const VERSION = '5.3.2'; /** * Class definition @@ -748,9 +748,9 @@ if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) { hrefAttribute = `#${hrefAttribute.split('#')[1]}`; } - selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null; + selector = hrefAttribute && hrefAttribute !== '#' ? parseSelector(hrefAttribute.trim()) : null; } - return parseSelector(selector); + return selector; }; const SelectorEngine = { find(selector, element = document.documentElement) { @@ -4038,13 +4038,15 @@ const ARROW_RIGHT_KEY = 'ArrowRight'; const ARROW_UP_KEY = 'ArrowUp'; const ARROW_DOWN_KEY = 'ArrowDown'; + const HOME_KEY = 'Home'; + const END_KEY = 'End'; const CLASS_NAME_ACTIVE = 'active'; const CLASS_NAME_FADE$1 = 'fade'; const CLASS_NAME_SHOW$1 = 'show'; const CLASS_DROPDOWN = 'dropdown'; const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'; const SELECTOR_DROPDOWN_MENU = '.dropdown-menu'; - const NOT_SELECTOR_DROPDOWN_TOGGLE = ':not(.dropdown-toggle)'; + const NOT_SELECTOR_DROPDOWN_TOGGLE = `:not(${SELECTOR_DROPDOWN_TOGGLE})`; const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]'; const SELECTOR_OUTER = '.nav-item, .list-group-item'; const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role="tab"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`; @@ -4144,13 +4146,19 @@ this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1)); } _keydown(event) { - if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key)) { + if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY, HOME_KEY, END_KEY].includes(event.key)) { return; } event.stopPropagation(); // stopPropagation/preventDefault both added to support up/down keys without scrolling the page event.preventDefault(); - const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key); - const nextActiveElement = getNextActiveElement(this._getChildren().filter(element => !isDisabled(element)), event.target, isNext, true); + const children = this._getChildren().filter(element => !isDisabled(element)); + let nextActiveElement; + if ([HOME_KEY, END_KEY].includes(event.key)) { + nextActiveElement = children[event.key === HOME_KEY ? 0 : children.length - 1]; + } else { + const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key); + nextActiveElement = getNextActiveElement(children, event.target, isNext, true); + } if (nextActiveElement) { nextActiveElement.focus({ preventScroll: true |