Replies: 1 comment
-
I think the correct behaviour should be ignoring text selection if there's click event on the view. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This issue can be a bit subtle and not immediately noticeable. Selectable text can silently swallow click events. The tiniest imperceptible drag of the mouse cursor, even when it doesn't actually select a character, seems to prevent click events from triggering.
I'm more likely to run into it when using a trackpad to click. Below is code for a small example that should demonstrate the pain-point. Quickly clicking through the list with a trackpad causes some select events to just not happen. While it's easy enough to fix as needed (setting
selectable
to false on the style), I thought I was going crazy wondering why it was happening at first. Buttons don't have this issue, as they are styled by default not to have selectable text.Having text selectable by default feels like more of a web convention than a UI toolkit convention. Though I could be pointing the finger at the wrong culprit here. Maybe the drag selection event is too easy to trigger and could be tweaked a touch? Either way it's a non-issue for me now, but maybe a foot-gun others can run into.
Beta Was this translation helpful? Give feedback.
All reactions