themesberg / flowbite-react

Official React components built for Flowbite and Tailwind CSS
https://flowbite-react.com
MIT License
1.78k stars 396 forks source link

Button text selectable #1228

Closed victorfunes closed 6 months ago

victorfunes commented 6 months ago

Steps to reproduce

  1. Create any button with text inside

Current behavior

The text can be selected, but by default it shouldn't

image

Expected behavior

By default the text should not be selectable in a button

tulup-conner commented 6 months ago

I don't experience this on https://www.flowbite-react.com/docs/components/button, can you provide an example, browser, etc.

victorfunes commented 6 months ago

In my case yes, it does the same: (look at the blue button)

image

You need to click ouside of the button and drag the cursor over the button like if you wanted to select several buttons at the same time.

I think it would be solved if in the theme base you added select-none, but I haven't looked at it in detail

tulup-conner commented 6 months ago

I can't reproduce that on Firefox but I can on Chromium-based browsers. However, that's the current behavior of the vanilla Flowbite library, so I don't think we have any need to take action here. I'm not sure I understand the motivation in the first place. Why shouldn't the text be selectable?