Skip to content

test: move a native editor's caret to its line's end on macOS with Meta+ArrowRight, not End - #7291

Merged
leaf-agent merged 2 commits into
mainfrom
fix/issue-7284
Nov 26, 2026
Merged

leaf-agent merged 2 commits into
mainfrom
fix/issue-7284

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

On macOS, Playwright sends End as the scrollToEndOfDocument: editing command, which scrolls the page and leaves a native editor's caret where it stood. Two tests in test_render_aim.py press End to move a contenteditable's caret to its end before typing, and both have failed on test-macos since #7188 gave the document its end room. The tests now press Meta+ArrowRight on macOS, which Playwright maps to moveToRightEndOfLine:, and End elsewhere. Linux keeps the same key it had.

  • test_design_mode_reads_each_shape_of_control_into_the_anchor_its_routes_carry (out of the mode): the click left the caret after the first character, so " edited" landed there and the editor read B editedackup draft.
  • test_automatic_design_capture_never_borrows_mutable_editor_context: End scrolled the page before the test dragged a selection across the editor, so the panel field never opened.

#7188's end room stays as it is. Only the key the tests use to reach the line's end changes.

Evidence from the macOS runner

Each run dispatched ci with flake, so test-macos ran only these two tests:

  • main at ab811b350: both failed 6 of 6 copies (run). 118f31f6d, the last scheduled pass, passed 6 of 6 (run).
  • Bisect: 14ba0041c passes, and 813d3262b (Give a document's end room to rise to the window's top, and drop the deck's held height #7188), its child, fails both tests (run).
  • A probe after leaving Design mode: End took scrollY to 2232 with the caret still at offset 1, and Meta+ArrowRight moved it to 12, the text's end.
  • Mod+End was tried first. It fixed the selection test but left the caret test failing 12 of 12.
  • This branch: both tests passed 12 of 12 copies, with 2 workers and 4 busy loops (run, at c541339a4, before a rebase onto main that touches no other line of this file).
  • Linux: both tests pass locally.

Closes #7284 — automated triage

@leaf-agent
leaf-agent merged commit ff98b3f into main Nov 26, 2026
7 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-7284 branch November 26, 2026 18:45
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.

Two Design-mode tests in test_render_aim fail only on macOS since 118f31f6d: caret after leaving the mode, missing panel field

1 participant