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•5 years ago
|
Assignee | ||
Comment 1•5 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•5 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•5 years ago
|
||
Out of curiosity, I took a look at what Blink does and it is:
Oh well.
Assignee | ||
Comment 5•5 years ago
|
||
This is the closest to the spec behavior, I think, and less likely to cause interop issues, but if you prefer me to stop the 'inheritance' chain at contenteditable elements or what not I can also do that.
Comment 6•5 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•5 years ago
|
Assignee | ||
Comment 7•5 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•5 years ago
|
Comment 8•5 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.
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0bacb9f000cc Make user-select: auto behave like user-select: text for editing roots. r=mats
Comment 10•5 years ago
|
||
bugherder |
Description
•