We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a270040 commit 09dc3a9Copy full SHA for 09dc3a9
src/tab.js
@@ -103,16 +103,7 @@ function tab({shift = false, focusTrap} = {}) {
103
!continueToTab && previousElement ? previousElement : nextElement
104
105
if (continueToTab) {
106
- const hasTabIndex = nextElement.getAttribute('tabindex') !== null
107
- if (!hasTabIndex) {
108
- nextElement.setAttribute('tabindex', '0') // jsdom requires tabIndex=0 for an item to become 'document.activeElement'
109
- }
110
-
111
focus(nextElement)
112
113
114
- nextElement.removeAttribute('tabindex') // leave no trace. :)
115
116
}
117
118
fireEvent.keyUp(keyUpTarget, {...tabKeyInit})
0 commit comments