You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the dropdown component (or any menu component), event listeners are registered to determine if the user is using a keyboard for navigation. The cleanup logic is faulty, leading to dangling event listeners (and a lot of them). On large sites, this soon leads to performance issues.
Describe the bug
This applies to
bits-ui@1.0.0-next.78
.When using the dropdown component (or any menu component), event listeners are registered to determine if the user is using a keyboard for navigation. The cleanup logic is faulty, leading to dangling event listeners (and a lot of them). On large sites, this soon leads to performance issues.
This:
bits-ui/packages/bits-ui/src/lib/bits/menu/menu.svelte.ts
Line 110 in 5792ab6
should be
(Frankly, the definition of
executeCallbacks
is not very clear or type-safe.)Will open a PR with a fix :)
Reproduction
https://stackblitz.com/edit/bits-ui-missing-listener-cleanup-repro?file=src%2Froutes%2F%2Blayout.svelte
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: