Skip to content

Commit

Permalink
Add a link to the relevant issue in the comment
Browse files Browse the repository at this point in the history
  • Loading branch information
KittyGiraudel committed Oct 3, 2023
1 parent b46af48 commit 348f30e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/a11y-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export default class A11yDialog {
// `event.composedPath()[0]` to get the actual click target. However in the
// case where the clicked element is a custom element (e.g. `<my-button>`),
// `event.composedPath()[0]` ends up being a `<slot>` element
// See: https://github.com/KittyGiraudel/a11y-dialog/issues/582
const target = [event.composedPath()[0], event.target].find(
node => (node as HTMLElement)?.tagName !== 'SLOT'
) as HTMLElement
Expand Down

0 comments on commit 348f30e

Please sign in to comment.