rob-balfre/svelte-select

Svelte 5: Chrome: list is not opened on the first click

Closed this issue ยท 5 comments

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.