Skip to content

fix(core): preserve text and caret across IME commits - #4

Merged
boojack merged 2 commits into
mainfrom
codex/fix-composition-state
Nov 15, 2026
Merged

boojack merged 2 commits into
mainfrom
codex/fix-composition-state

Conversation

@boojack

@boojack boojack commented Nov 15, 2026

Copy link
Copy Markdown
Member

An unfinished composition in a table could leave later visible typing out of saved Markdown after a click into another block. Finish the composition when a pointer leaves its text container, and place the committed caret before the unchanged suffix so Japanese clause conversions keep later typing at the end of the word.

Read the actual selection after caret keyup to cover WebKit normalization beside dividers. Correct the numbered-list layout assertion to measure marker boxes, including items below the viewport.

Add regression coverage for clause selections, interrupted table compositions, save/reload and undo/redo. Retain all five previously failing Fuzz seeds in regular CI.

Closes #3.

Validation: typecheck, 10,119 unit/spec tests and build passed locally. The three Japanese clause cases pass in Chromium, and Firefox seed 2026111422 passes in the Linux Playwright environment. Full browser/Fuzz CI remains to be checked.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

The editor now tracks composition location and trailing text, updates the caret after composition ends, and ends composition when a pointer press is outside the composing content. New Chromium tests cover Japanese clause selection and moving from a composing table cell to a paragraph. The documentation adds related IME cases. Separate E2E changes add a WebKit divider-boundary test, adjust numbered-list marker checks, and add fixed fuzz seeds under default settings.

Severity of issue fixed: Medium

Merge Risk: Moderate · up to 030c1

Japanese IME users can have text typed after a conversion land in the middle of the sentence if the browser sends a selection event before the settle frame. Pressing outside a composing suggestion popup can also discard the item the user clicked. Both should be fixed before merging.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@boojack
boojack merged commit 2fc5ff8 into main Nov 15, 2026
6 checks passed

boojack commented Nov 15, 2026

Copy link
Copy Markdown
Member Author

Both review-summary findings were validated. The suggestion click regression was fixed in 4da6cac and is already included in the merge; all 47 Chromium IME tests passed after that fix. The remaining late Japanese clause-selection race is addressed in #5 with regressions for all three clause selections. Those new cases fail on the merged code and all 50 Chromium IME tests pass with the follow-up. Publication remains gated on the follow-up's full CI and completed review.

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.

Caret jumps back to the active clause after committing a multi-clause Japanese IME conversion

1 participant