Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerJDev committed Aug 14, 2024
1 parent 1609e10 commit 6a888bf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/focus-trap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function observeFocusTrap(container: HTMLElement, sentinels: HTMLElement[]) {

const [sentinelStart, sentinelEnd] = sentinels

// Adds back sentinel to correct position in the DOM
if (!firstChild?.classList.contains('sentinel')) container.insertAdjacentElement('afterbegin', sentinelStart)
if (!lastChild?.classList.contains('sentinel')) container.insertAdjacentElement('beforeend', sentinelEnd)
}
Expand Down

0 comments on commit 6a888bf

Please sign in to comment.