Svelte 5: Chrome: list is not opened on the first click
Closed this issue ยท 5 comments
Firefox 126 works. Chrome 125 doesn't.
The same code on Svelte 4:
https://svelte.dev/repl/cde634ff0a054288a0da1044cfd3d4eb?version=4.2.17
and on Svelte 5.0.0-next.136
:
In the Svelte 5 the first click on the select doesn't open the list.
I tried Firefox and it works! Chrome doesn't!
I opened sveltejs/svelte#11691.
Same here. What I have found is that an initial binding to listOpen={true}
fixes the issue.
<script>
import Select from 'svelte-select';
const items = [
{value: 'chocolate', label: 'Chocolate', group: 'Sweet'},
{value: 'pizza', label: 'Pizza', group: 'Savory'},
{value: 'cake', label: 'Cake', group: 'Sweet', selectable: false},
{value: 'chips', label: 'Chips', group: 'Savory'},
{value: 'ice-cream', label: 'Ice Cream', group: 'Sweet'}
];
let listOpen = $state(true);
</script>
<Select {items} bind:listOpen />
@frederikhors Can you confirm this?
@ennoente apparently this issue is on Chrome & on Windows: sveltejs/svelte#11691.
With listOpen
works, but is not a valid workaround.
@frederikhors thanks for opening the issue over on Svelte, was an interesting read this morning! A Chrome bug, wild times!
is It seems to be working fine without any problems now.
- 125.0.6422.142(๊ณต์ ๋น๋) (64๋นํธ)
This can probably be closed now. The fix for svelte 5 has been released.