user-select: none prevents selection in editable stuff in Gecko, but not in WebKit / Blink.
Categories
(Core :: Layout, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox66 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
See test-case. We prevent selection even for editable stuff, but WebKit doesn't.
This is the underlying issue of bug 1511391.
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 1•6 years ago
|
||
Mats, wdyt?
Would you be fine gating selection on both -moz-user-select and -moz-user-modify, so that -moz-user-modify: read-write always implies selectability?
Maybe other ideas? Or maybe we should file a Blink bug instead?
Comment 3•6 years ago
•
|
||
It seems cleaner to keep the properties orthogonal and true to their meaning.
Could we fix it by adding something like "[contenteditable=true] { -moz-user-select: text }" in the UA sheet instead?
Alternatively, hack "UsedUserSelect" to stop the "inheritance" at an "independent selection" boundary?
| Assignee | ||
Comment 4•6 years ago
|
||
Out of curiosity, I took a look at what Blink does and it is:
Oh well.
| Assignee | ||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
This looks fine, but I'd prefer to add the IsEditingHost block after
the "style != StyleUserSelect::Auto" block, so that it's possible to
override it by explicitly setting a non-auto value on the editable element.
That's not what the spec currently says, but it's what you suggest in
https://github.com/w3c/csswg-drafts/issues/3344, right?
Updated•6 years ago
|
| Assignee | ||
Comment 7•6 years ago
|
||
(In reply to Mats Palmgren (:mats) from comment #6)
This looks fine, but I'd prefer to add the IsEditingHost block after
the "style != StyleUserSelect::Auto" block, so that it's possible to
override it by explicitly setting a non-auto value on the editable element.
That's not what the spec currently says, but it's what you suggest in
https://github.com/w3c/csswg-drafts/issues/3344, right?
Yeah, I agree that's better over-all. Done :)
| Assignee | ||
Updated•6 years ago
|
Comment 8•6 years ago
|
||
Thanks. Yeah, it's easy to change if #3344 comes to a different consensus,
but for now this is good since it also allows us to see if it's web-compatible.
Comment 10•6 years ago
|
||
| bugherder | ||
Description
•