Skip to content

Explainer for visual order caret movement in bidi text#1304

Open
sambandaru wants to merge 3 commits intoMicrosoftEdge:mainfrom
sambandaru:bidi-caret-navigation
Open

Explainer for visual order caret movement in bidi text#1304
sambandaru wants to merge 3 commits intoMicrosoftEdge:mainfrom
sambandaru:bidi-caret-navigation

Conversation

@sambandaru
Copy link
Copy Markdown

@sambandaru sambandaru commented Apr 17, 2026

Chromium currently uses logical (DOM-order) caret movement, which causes the caret to jump unpredictably at bidi boundaries. This explainer proposes switching to visual caret movement - Left always moves left, Right always moves right. The feature will be gated behind the BidiVisualOrderCaretMovement feature flag.

This aligns Chromium with Firefox and Safari, which already default to visual caret movement.

Comment thread Editing/bidi-visual-order-caret-movement-explainer.md
Comment thread Editing/bidi-visual-order-caret-movement-explainer.md
Comment thread Editing/bidi-visual-order-caret-navigation-explainer.md Outdated
Comment thread Editing/bidi-visual-order-caret-movement-explainer.md
Copy link
Copy Markdown

@utpathak utpathak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments.

@sambandaru sambandaru changed the title Explainer for visual order caret navigation in bidi text Explainer for visual order caret movement in bidi text Apr 20, 2026
@sambandaru sambandaru force-pushed the bidi-caret-navigation branch from 89a95d4 to a24431d Compare April 22, 2026 17:24
Comment thread Editing/bidi-visual-order-caret-movement-explainer.md Outdated
Comment thread Editing/bidi-visual-order-caret-movement-explainer.md Outdated
Comment thread Editing/bidi-visual-order-caret-movement-explainer.md
Comment thread Editing/bidi-visual-order-caret-movement-explainer.md Outdated
- Web developers building multilingual editing experiences
- Accessibility users who rely on consistent and predictable caret behavior

User research with Arabic–English bilingual users confirms that almost all participants expect visual caret movement — Left always moves left, Right always moves right — regardless of script direction.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, is there anything more specific we can share about what user research was done?

Copy link
Copy Markdown
Author

@sambandaru sambandaru Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread Editing/bidi-visual-order-caret-movement-explainer.md Outdated
Comment thread Editing/bidi-visual-order-caret-movement-explainer.md
2. **WHATWG Selection API -- `Selection.modify()`:** https://w3c.github.io/selection-api/#dom-selection-modify
3. **Firefox `bidi.edit.caret_movement_style` preference:** https://kb.mozillazine.org/bidi.edit.caret_movement_style
4. **macOS TextKit 2 — NSTextSelectionNavigation:** https://developer.apple.com/documentation/uikit/nstextselectionnavigation/direction
5. **Chromium M76 visual navigation removal:** https://crbug.com/972750, https://crbug.com/834765
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have access to the first of these bugs, and the second one is an Extensions bug that seems unrelated (wrong link?). Is there more you can say about why this was removed in the past?

Copy link
Copy Markdown
Author

@sambandaru sambandaru Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have referenced the correct PSA now.
Apparently, it was because the behavior was too difficult to maintain with LayoutNG.

Comment thread Editing/bidi-visual-order-caret-movement-explainer.md Outdated
@sambandaru sambandaru force-pushed the bidi-caret-navigation branch 2 times, most recently from b2612f4 to 172ea28 Compare April 23, 2026 10:19
@sambandaru sambandaru force-pushed the bidi-caret-navigation branch from 172ea28 to cd4d6eb Compare April 23, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants