Firefox selects button-text when you click-and-drag inside of buttons (if they have 'user-select:auto')
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox154 | --- | fixed |
People
(Reporter: dholbert, Assigned: dshin)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
STR:
- Load attached testcase (which has some buttons with
user-select:auto). - Click inside the buttons and drag across the text.
ACTUAL RESULTS:
Text gets selected.
EXPECTED RESULTS:
Text should probably not get selected (because it's confusing if you were really just trying to click the button)
Note, Chrome lets you select the text if you click outside the button and drag across the button. But they don't let you select text if you start your click inside the button.
We probably need to fix this before we can make user-select:auto the default style for buttons in bug 1998331 (which we have webcompat reasons to want to do, as noted there).
| Reporter | ||
Comment 1•3 months ago
|
||
Comment 2•3 months ago
|
||
Be careful about the editable case. Chrome allows to select and edit the text in <button>.
| Reporter | ||
Comment 3•3 months ago
|
||
| Reporter | ||
Comment 4•3 months ago
•
|
||
(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900)(PTO: 5/2-5/10) from comment #2)
Be careful about the editable case. Chrome allows to select and edit the text in
<button>.
Thanks, good callout. In contenteditable, specifically for <button> (first part of testcase 2), Chrome does indeed let you click-and-drag-within-the-button to select text, but only if your initial click is in the text part of the button (as opposed to the padding).
That seems to match how Firefox currently behaves for <input type="button"> (regardless of contenteditable), actually!
For true <button> (first part of testcase 1 and testcase 2), Firefox lets you click the padding-top and drag down to the padding-bottom, and select all the text in between.
Comment 5•3 months ago
|
||
The severity field is not set for this bug.
:alaskanemily, could you have a look please?
For more information, please visit BugBot documentation.
| Reporter | ||
Updated•3 months ago
|
| Reporter | ||
Updated•3 months ago
|
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 6•2 months ago
|
||
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/61141 for changes under testing/web-platform/tests
Comment 9•1 month ago
|
||
| bugherder | ||
Upstream PR merged by moz-wptsync-bot
Updated•1 month ago
|
Description
•