kobaltedev / kobalte

A UI toolkit for building accessible web apps and design systems with SolidJS.
https://kobalte.dev
MIT License
1.2k stars 61 forks source link

Text highlighted after choosing a select option #266

Closed benalleng closed 5 months ago

benalleng commented 11 months ago

Describe the bug When choosing a select option the cursor behaves as though it is being held and begins to highlight text around the select.root

Functions normally in Chrome

To Reproduce

  1. Click a select field where a root has some siblings or parent elements with Text
  2. choose an option, upon the list-box closing move the cursor around and the text will be higlighted

A quick sandbox showing the behavior

https://codesandbox.io/p/sandbox/sad-water-z2rkg4?file=/src/App.tsx:21,25

firefox-select-repro

Expected behavior Focus should remain on the select trigger and the cursor should not highlight other text

jer3m01 commented 7 months ago

You can add user-select: none; to the select item, such as in https://kobalte.dev/docs/core/components/select#controlled-value.

benalleng commented 5 months ago

Works! thanks!