We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c5d4bc commit 8fa883cCopy full SHA for 8fa883c
src/util.js
@@ -1,5 +1,5 @@
1
-export function programmaticFocus (el) {
+export function programmaticFocus (el, timeout = 1000) {
2
el.setAttribute('tabindex', '-1')
3
el.focus()
4
- el.removeAttribute('tabindex')
+ setTimeout(() => el.removeAttribute('tabindex'), timeout)
5
}
0 commit comments