aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorGeoSot <[email protected]>2022-10-02 13:05:30 +0300
committerGitHub <[email protected]>2022-10-02 13:05:30 +0300
commitd49d8ce583f6f12552f122122a99063738656cd9 (patch)
tree9880079f82362c7e4729f70880a427ce82198480 /js/src
parent0a5f6e078c9cb9ecca9ab90b3984c5f792a11bae (diff)
downloadbootstrap-d49d8ce583f6f12552f122122a99063738656cd9.tar.xz
bootstrap-d49d8ce583f6f12552f122122a99063738656cd9.zip
Ensure Tab keyboard functionality after #37146 (#37200)
* fix: keyboard functionality * test: add tests * Add some focus spies in 2 other unit tests Co-authored-by: Julien Déramond <[email protected]>
Diffstat (limited to 'js/src')
-rw-r--r--js/src/tab.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/js/src/tab.js b/js/src/tab.js
index 1d6d68d85..2f1803754 100644
--- a/js/src/tab.js
+++ b/js/src/tab.js
@@ -161,6 +161,7 @@ class Tab extends BaseComponent {
const nextActiveElement = getNextActiveElement(this._getChildren().filter(element => !isDisabled(element)), event.target, isNext, true)
if (nextActiveElement) {
+ nextActiveElement.focus({ preventScroll: true })
Tab.getOrCreateInstance(nextActiveElement).show()
}
}