(e: FocusEvent & { currentTarget: HTMLElement | null })
| 23 | } |
| 24 | |
| 25 | const handleTriggerFocus = (e: FocusEvent & { currentTarget: HTMLElement | null }) => { |
| 26 | const firstChild = e.currentTarget?.firstElementChild as HTMLElement |
| 27 | if (!firstChild) return |
| 28 | |
| 29 | firstChild.focus() |
| 30 | trigger.tabIndex = -1 |
| 31 | |
| 32 | firstChild.addEventListener("focusout", resetTabIndex) |
| 33 | onCleanup(() => { |
| 34 | firstChild.removeEventListener("focusout", resetTabIndex) |
| 35 | }) |
| 36 | } |
| 37 | |
| 38 | onMount(() => { |
| 39 | // @ts-ignore |
nothing calls this directly
no outgoing calls
no test coverage detected