We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33858a3 commit e55bf40Copy full SHA for e55bf40
site/content/examples/15-composition/04-modal/Modal.svelte
@@ -15,11 +15,7 @@
15
if (e.key === 'Tab') {
16
// trap focus
17
const nodes = modal.querySelectorAll('*');
18
- const active = document.activeElement;
19
-
20
const tabbable = Array.from(nodes).filter(n => n.tabIndex >= 0);
21
- const first = tabbable[0];
22
- const last = tabbable[tabbable.length - 1];
23
24
let index = tabbable.indexOf(document.activeElement);
25
if (index === -1 && e.shiftKey) index = 0;
0 commit comments