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

concept-range-bp-set should compare root nodes before bp relative position #924

Closed
edg2s opened this issue Nov 16, 2020 · 3 comments · Fixed by #925
Closed

concept-range-bp-set should compare root nodes before bp relative position #924

edg2s opened this issue Nov 16, 2020 · 3 comments · Fixed by #925
Labels
good first issue Ideal for someone new to a WHATWG standard or software project topic: ranges

Comments

@edg2s
Copy link

edg2s commented Nov 16, 2020

In https://dom.spec.whatwg.org/#concept-range-bp-set:

If bp is after the range’s end, or if range’s root is not equal to node’s root, set range’s end to bp.

(and similar for "set the end")

This implies that implementations should check if "bp is after the range’s end", however the first step of comparing boundary points is to "Assert: nodeA and nodeB have the same root.".

I would suggest this be re-ordered to:

If range’s root is not equal to node’s root, or if bp is after the range’s end, set range’s end to bp.

(and similar for "set the end")

@annevk annevk added good first issue Ideal for someone new to a WHATWG standard or software project topic: ranges labels Nov 16, 2020
@chansuke
Copy link
Contributor

Hi, this is my first contribution. I'd like to have a try.

@annevk
Copy link
Member

annevk commented Nov 17, 2020

@chansuke that's great! Please go for it, you'll have to create a pull request and be able to sign https://participate.whatwg.org/agreement.

@chansuke
Copy link
Contributor

@annevk Thank you for the comment! Signed it and sent a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Ideal for someone new to a WHATWG standard or software project topic: ranges
Development

Successfully merging a pull request may close this issue.

3 participants