Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ph-fritsche committed Aug 19, 2022
1 parent 22c0234 commit b322220
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/focus/focusable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ export const FOCUSABLE_SELECTOR = [
*/
export function isFocusTarget(element: Element): element is HTMLElement {
if (element.tagName.includes('-')) {
// custom elements without delegatesFocus are ignored
// custom elements without `delegatesFocus` are ignored
return delegatesFocus(element)
}
// elements that don't delegateFocus behave normal even if they're a shadow host
// elements without `delegatesFocus` behave normal even if they're a shadow host
return delegatesFocus(element) || element.matches(FOCUSABLE_SELECTOR)
}

Expand Down

0 comments on commit b322220

Please sign in to comment.