Closed Bug 203291 Opened 22 years ago Closed 11 years ago

Allow sub-elements of a '-moz-user-select: none' element to be selectable

Categories

(Core :: DOM: Editor, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: glazou, Assigned: glazou)

References

Details

(Keywords: testcase, Whiteboard: nvu)

Attachments

(2 files)

This is a RFE for a new value 'text-override' for the -moz-user-select property. Its behavior is basically equal to the behavior of the 'text' value modulo the fact it can override a 'none' or 'all' value set on an ancestor of the element.
Comment on attachment 121631 [details] [diff] [review] very simple fix #1 mjudge, can you r= please ? kin, can you sr= please ?
Attachment #121631 - Flags: superreview?(kin)
Attachment #121631 - Flags: review?(mjudge)
The changes look ok to me, I'm just wondering if 'text-override' is a good name for this value? To me, this implies that it only pertains to text when this should be allowing us to select anything under a subtree with this value set right?
the code looks fine. Is there a bug or something I can look at to see why we need this? I am not sure if its my job here to police whether we need this change.
Why not let the computed style decide this instead? I mean why would a new property be needed. In theory it should work to just set the -moz-user-select on an element. Right now it seems that if any ancestor has user select set to none there is no way whatsoever to override that. This totally breaks some scenarios and I hope that someone can change this from enhancement to normal. Testcase coming up
Keywords: testcase
-moz-user-select is not an inherited property.
Ok. I've reread the working draft and it is pretty clear that user-select none should prevent selection of any of its descendants. Fortunately this is still just a working draft. I really think that this needs to be reconsidered and obviously I'm not the only one that is having trouble with the current model. If someone sets user-selectable to none on the root element inputs will not work any more, no matter what I do. This seems like a usabily issue and I can see scenarios where users would like to specify that text must be selectable by providing a user style sheet.
Status: NEW → ASSIGNED
Whiteboard: nvu
dbaron: I need to revive this patch - and actualize it - for Nvu. mjudge had an interesting comment about the value name. Do you have a proposal for that name? -moz-force-text ?
Comment on attachment 121631 [details] [diff] [review] very simple fix #1 removing [very] old review request[s], please re-request from someone if applicable. If you need to contact me specifically please add |Callek| to CC
Attachment #121631 - Flags: superreview?(kinmoz)
Attachment #121631 - Flags: review?(mjudge)
Some kind of solution would be very nice to have for serious web applications. Is anyone still discussing/working on this? If the name is the issue, how about "normal-override"? As far as the draft CSS spec goes---how does one get feedback to the authors, anyway?
Comment on attachment 121631 [details] [diff] [review] very simple fix #1 dbaron: can you please give this patch a quick review. thx!
Attachment #121631 - Flags: review?(dbaron)
And my comments in bug 307256 comment 22 mostly apply here as well.
QA Contact: bugzilla → editor
In case anyone bumps into this bug, here is the result of all successive proposed patches and fixes in this and other bugs... If you need to allow selection in an element E but disable selection in one of its ascendants A, use this on the A element : -moz-user-select : -moz-none; (instead of just 'none'). On E, you'll be able to allow selection with : -moz-user-select : text; (or whatever value you liked). It works on FF2. I suppose this could qualify as 'VERIFIED FIXED'... Regards. Thanks. Merry Christmas.
This was fixed quite a while ago.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
This bug seems to have returned, see: https://jsfiddle.net/xryfjtL6/
(In reply to liampmccabe from comment #19) > This bug seems to have returned, see: https://jsfiddle.net/xryfjtL6/ Woops, sorry the above workaround worked. My bad! Have a nice day everyone.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: