Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-ui-4] let user-select:contain prohibit selection from outside #1815

Closed
yoichio opened this issue Sep 14, 2017 · 6 comments
Closed

[css-ui-4] let user-select:contain prohibit selection from outside #1815

yoichio opened this issue Sep 14, 2017 · 6 comments
Assignees
Labels
Closed Rejected as Wontfix by CSSWG Resolution Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-ui-4 Current Work Tracked in DoC

Comments

@yoichio
Copy link

yoichio commented Sep 14, 2017

https://drafts.csswg.org/css-ui-4/#valdef-user-select-contain

user-select:contain stops selection leaking from inside to outside, but often
we want to prohibit selection from outside.
For position: absolute, we want selection on normal layout elements to skip over the abs elements but
also want user to be enable to select the element.
For form/editable element, it is also strange that selection from outside can go into the form.

How about make user-select:contain more strict that prohibits selection transit?

@frivoal
Copy link
Collaborator

frivoal commented Sep 15, 2017

So in essence, you would like a change from this sentence

The UA must allow selections to extend across this element, and such selections must include the content of the element.

to

The UA must allow selections to extend across this element, and such selections must not include the content of the element.

Maybe this is a good idea instead of the current behavior, or maybe this is a good idea of an additional value with a different behavior.

However, we have a problem: For this to work, we would need selections that can contain multiple DOM ranges. Currently, only firefox supports this, and as far as I know, no other browser plans to implement that behavior.

If it would be acceptable to have the behavior you ask in browsers like firefox (and probably only firefox), and to keep the current behavior everywhere else (similarly to how user-select:none skips the content in Firefox only), then we can do this. Not saying everyone will agree, but at least it is arguable possible. Otherwise, I don't think we have a realistic path forward.

@frivoal frivoal self-assigned this Sep 15, 2017
@frivoal frivoal added the css-ui-4 Current Work label Sep 15, 2017
@frivoal
Copy link
Collaborator

frivoal commented Mar 27, 2018

I don't mind specifyng this (probably as an user-select: auto | text | all | [ [ none | contain ] skip?]) if there is interest from browsers, but otherwise it is not a useful exercise. Adding it to the Agenda to see if this is worth considering or not from that point of view.

@astearns
Copy link
Member

@frivoal should this go on the weekly agenda, since we didn't get to it at the F@F meeting?

@css-meeting-bot
Copy link
Member

css-meeting-bot commented Sep 5, 2018

The CSS Working Group just discussed let user-select:contain prohibit selection from outside , and agreed to the following:

  • RESOLVED: don't fix and explain why in the issue
The full IRC log of that discussion <dael> Topic:let user-select:contain prohibit selection from outside
<dael> github: https://github.com//issues/1815
<dael> florian: There is a value that corrisponds to the behavior everyone has. We say if you start selection before element and end after then selection must include the element in the middle. Someone suggested we should exclude it. So content before and after, but not contained element.
<dael> florian: afaict this is not what people impl. Only FF supports multi-part selections. However the none value is a middle ground. Browsers that support multi-part must have 2 part selection and others must make one big selection. but they can exclude the middle part.
<dael> florian: That's for none and corrisponds to what people impl. Doesn't corrispond for contain, but we could do it.
<dael> fantasai: What's most reasonable for use case?
<dael> florian: no use case mentioned. We are mostly interop
<dael> myles: No use case plus interop seems clear
<dael> florian: This is from google. Anyone know why?
<dael> fantasai: You can say we're leaning to not because interop and we have no use cases. If they come back with use cases we can reconsider
<dael> Rossen_: Proposal: resolve no fix and expalin why in the issue
<dael> RESOLVED: don't fix and explain why in the issue

@frivoal
Copy link
Collaborator

frivoal commented Sep 6, 2018

@yoichio

The existing behavior, which is not to skip over such elements, is interoperable. Even when the value is not explicitly supported, the behavior is the one you get on (for example) a textarea.

If you have strong use cases that justify changing from what people currently do, we can reopen, but otherwise, the WG has decided to close as wontfix and to keep the specification (and implementations) unchanged.

We'd appreciate if you could let us know whether that's acceptable to you (and if not, why not).

@yoichio
Copy link
Author

yoichio commented Sep 6, 2018

Thanks for discussing about this.
O.K. Since we don't have any strong request from user, let it be wontfix.

@frivoal frivoal added the Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. label Sep 6, 2018
@frivoal frivoal closed this as completed Dec 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Rejected as Wontfix by CSSWG Resolution Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-ui-4 Current Work Tracked in DoC
Projects
None yet
Development

No branches or pull requests

4 participants