1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-06 05:37:39 +02:00

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 <juderamond@gmail.com>
This commit is contained in:
GeoSot
2022-10-02 13:05:30 +03:00
committed by GitHub
parent 0a5f6e078c
commit d49d8ce583
2 changed files with 31 additions and 4 deletions

View File

@@ -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()
}
}