Repository navigation
Draw the caret just past a list bullet in the text field - #3694
Merged
Merged
Conversation
The caret vanished when it stood right after a new list item's bullet,
the place where the item's words start, in Firefox and Chromium alike.
With a space typed after the bullet it showed again.
A new item hides its source marker ("- ") behind the platform's bullet,
and the caret's place at the marker's end is inside the marker's text,
where CodeMirror and the browser put it. The marker was hidden with
`color: transparent`, and the field's `caret-color: currentColor`
resolves per element, so the caret was drawn in the marker's transparent
ink. Hiding the glyphs with `-webkit-text-fill-color` instead leaves the
marker's colour the words', so the caret keeps their ink. The same rule
hides a code fence's lines while the caret is away.
`test_the_caret_after_a_list_bullet_is_drawn` reads the caret's ink in
Chromium and Firefox after continuing a list, deleting the marker's
space, and arriving by arrows; all three read transparent before the
fix. The caret reading now shares its walk with the line-end clip test.
> _This was written by Claude Code on behalf of max-sixty_
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # dist/kernel/kernel.json
leaf-agent
approved these changes
Oct 23, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 23, 2026
The draft list test now reads the marker's text fill to tell whether its source glyphs are visible. #3694 changed hidden markers from transparent `color` to transparent `-webkit-text-fill-color` so the caret remains visible just past a bullet; the old assertion read the still-opaque `color` and failed even though the marker remained hidden. The focused browser test failed on current main before this change and passed afterward: `uv run pytest -q -n0 tests/browser/test_render_floating_panel.py::test_a_draft_draws_a_list_as_the_message_will`. This addresses that failure in [main CI run 39906202258](https://github.com/max-sixty/leaf/actions/runs/39906202258). The run also has separate browser failures under investigation in #3695. 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.
In Firefox and Chromium, the text field drew no caret when it stood right after a new list item's bullet, where the item's words start. It showed again once a space was typed after the bullet.
A new item hides its source marker (
-) behind the platform's bullet, and the caret's place at the marker's end is inside the marker's text. The marker was hidden withcolor: transparent, and the field'scaret-color: currentColorresolves per element, so the caret took the marker's transparent ink. Hiding the glyphs with-webkit-text-fill-colorleaves the marker'scolorthe words', so the caret keeps their ink. The same rule hides a code fence's lines while the caret is away.test_the_caret_after_a_list_bullet_is_drawnreads the caret's ink in Chromium and Firefox after continuing a list, after deleting the marker's space, and after arriving by arrows. All three read transparent before the fix. Playwright's Firefox screenshots never draw a caret (Juggler captures withdrawSnapshot), so the visual before/after was taken from Firefox's video frames.