Repository navigation
fix: preserve caret paint room during field motion - #4442
Merged
Merged
Conversation
This was referenced Oct 27, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 30, 2026
The narrow-field caret check treated a trailing space's DOM Range edge as the painted caret. With `pre-wrap`, that space can hang outside the line while Chromium pulls its native caret back inside. The CI screenshot shows the caret inside the field despite the −2.421875px Range reading. The test now moves left across the trailing space before measuring, checking the caret beside the final ink. It keeps both engines, the narrow allocation, the clipping assertion, and the held final-motion frame from #4442. No runtime geometry changes. The original Chromium case passes immediately before #4714 and fails at that change, which deliberately gives draft words Send's column under a mouse. It also fails on current main with the reported −2.421875px reading. Both Chromium and Firefox cases pass with this correction. This preserves #4714's layout choice rather than reserving extra room to satisfy a Range measurement. Closes #4755 — automated triage Co-authored-by: leaf-agent <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Field motion was replacing the editor's normal 2px caret margin with its travel distance, including zero. That cut off Firefox's line-end caret while the comment box grew. The shared motion now preserves at least 2px in the overflow clip and leaves the same inline room in its moving content clip, preserving the box and word motion from #4326 and #4379.
The regression now holds the last moving frame and measures both clips, so animation cleanup cannot conceal the failure. It fails against the old motion code and passes with this change in Firefox and Chromium. The panel's word/mark growth-and-shrink and below-cap deletion checks pass, as do all 682 runtime tests and the browser build check. The kernel is regenerated.
Closes #4428 — automated triage