DioxusLabs/dioxus

`user-select: none` isn't being applied through CSS style (must add manually to every element)

Opened this issue · 0 comments

Problem

I tried adding

input[typ="button"], button {
  user-select: none;
}

to main.css, but it did not remove text selection even after manual rebuild. But it does work if I do:

input[typ="button"], button {
  color: red;
}

So it seems that the issue is with that particular property.

Steps To Reproduce

Steps to reproduce the behavior:

Expected behavior

Text isn't selectable for the specified elements.

Screenshots

Environment:

  • Dioxus version: v0.6.1
  • Rust version: rustc 1.83.0-nightly (fb4aebddd 2024-09-30)
  • OS info: Pop!_OS 22.04
  • App platform: desktop

Questionnaire

I'm interested in fixing this myself but don't know where to start.
I don't have time to fix this right now, but maybe later.