Re: [whatwg/dom] Add definition for composed selection range (PR #1342)

@sefeng211 commented on this pull request.



>       to <var>bp</var>.
 
+     <li>Otherwise, if <var>bp</var> is
+     <a for="boundary point">after</a> the
+     <var>range</var>'s <a for=range>end</a>, then:
+      <ol>
+       <li>Set <var>range</var>'s <a for=range>end</a>
+       to <var>bp</var>.
+
+       <li>If <var>selection range</var> is not null,
+       set <var>selection range</var>’s
+       <a for="range">end</a> to <var>bp</var>.

It looks like we only collapse the `composed selection range` when the nodes are in the same tree. Shouldn't we also compare the nodes if they are in different tree (with a new algorithm like `compose-after`), and collapse the `composed selection range` if the new start is `compose-after` the existing end? This also applies to the setting the end case. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1342#pullrequestreview-2627468425
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/pull/1342/review/2627468425@github.com>

Received on Wednesday, 19 February 2025 17:09:51 UTC