2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-02 16:04:07 +03: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
+1
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()
}
}