Skip to content

Commit

Permalink
remove some unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Oct 27, 2019
1 parent 33858a3 commit e55bf40
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions site/content/examples/15-composition/04-modal/Modal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
if (e.key === 'Tab') {
// trap focus
const nodes = modal.querySelectorAll('*');
const active = document.activeElement;
const tabbable = Array.from(nodes).filter(n => n.tabIndex >= 0);
const first = tabbable[0];
const last = tabbable[tabbable.length - 1];
let index = tabbable.indexOf(document.activeElement);
if (index === -1 && e.shiftKey) index = 0;
Expand Down

0 comments on commit e55bf40

Please sign in to comment.