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

Clarify association between a selection and its range #2

Open
rniwa opened this issue Sep 16, 2014 · 2 comments
Open

Clarify association between a selection and its range #2

rniwa opened this issue Sep 16, 2014 · 2 comments

Comments

@rniwa
Copy link
Contributor

rniwa commented Sep 16, 2014

"Once a selection is associated with a given range, it must continue to be associated with that same range until this specification requires otherwise."

This paragraph above is vague. It needs to be replaced by detailed conformance requirements saying exactly what to do for particular keystrokes, like we have for backspace/delete/etc.

yoichio pushed a commit to yoichio/selection-api that referenced this issue Oct 12, 2018
@yoichio
Copy link

yoichio commented Nov 12, 2018

Current spec states:
"Each selection can be associated with a single range. When there is no range associated with the selection, the selection is empty. The selection must be initially empty."
but per WICG/webcomponents#79, selection should be associated with a composition range so that
selection can represent range-over-shadow and calling SetBaseAndExtent with shadow nodes sets such selection simply w/o any adjustment.

Concerns.
Selection is associated with DOM Range, witch adjusts itself when DOM tree changes but a composition range might not or it is not speced.
getRangeAt() needs some adjustment to return DOM Range from the composition range.

@rniwa
Copy link
Contributor Author

rniwa commented Nov 12, 2018

Yeah, I think we need to change the internal model of selection to be some kind of composed range from which Range and composed range exposed to a script is computed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants