Re: [w3c/selection-api] Fix selection.modify() to use resolved text direction instead of inline base direction (PR #357)

@sambandaru commented on this pull request.



> @@ -731,6 +731,15 @@ <h2>
             selection by <var>granularity</var>.
             </li>
           </ol>
+          <p>
+            The <dfn>resolved text direction</dfn> at a <a>boundary point</a>
+            is <a data-xref-type="css-value"
+            data-xref-for="direction">ltr</a> if the bidi embedding level of
+            the character at that position is even, and <a

Added a note: at a bidi boundary, user agents may use additional context (such as caret affinity based on the direction of cursor movement) to determine which character's embedding direction to use. This intentionally defers the boundary heuristic to UAs, matching existing implementations.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/selection-api/pull/357#discussion_r3165853854
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/selection-api/pull/357/review/4202674438@github.com>

Received on Thursday, 30 April 2026 05:41:33 UTC