Possible bug when dropdown menus close #1302
Replies: 4 comments 13 replies
-
Perhaps interesting update I still have not managed to make a repo I can share, BUT, I've confirmed that it is a specific version of svelte where the bug occurs: 5.23.0! When i downgrade my project before that, no problems. But upgrading to that version+ and get the issue. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Having the same issue when closing a Dialog. svelte 5.25.3, bits-ui 1.3.16 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, didn't want to raise a bug until I was sure.
Variously, our dropdowns have started throwing an error when an item is selected and the dropdown closes.
onCloseAutoFocus.current is not a function
Looking at the code from console output, the crash happens here:
bits-ui/packages/bits-ui/src/lib/bits/utilities/focus-scope/use-focus-scope.svelte.ts
Line 199 in e46355b
I am guessing from where the
handleClose
function is called that the param to that function is expected to sometimes benull
, but.current
is called on it regardless.I'm very unfamiliar with the code base and so could be completely off. I'm not yet able to reproduce, but I will try to make one if you need.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions