fix(frontend): keep empty list item caret aligned - #230
Merged
stefan-ernst merged 1 commit intoAug 29, 2026
Conversation
stefan-ernst
approved these changes
Aug 29, 2026
stefan-ernst
left a comment
Contributor
There was a problem hiding this comment.
Great, thank you! Lets get it merged
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.
What changed
Updates the Milkdown editor blank-line CSS so it no longer applies to ProseMirror’s internal trailing break node.
The editor still preserves intentional blank lines, but excludes
br.ProseMirror-trailingBreakfrom the custom block-style<br>rule.Why
When creating a new Markdown bullet item, ProseMirror inserts an internal trailing break into the empty list item so the caret has a place to render. Windshift’s editor CSS was styling all
<br>elements as block-level blank-line placeholders with extra top margin.That caused the caret for a new empty bullet point to appear offset/misaligned until text was typed. Once text existed, ProseMirror no longer relied on that trailing break, so the alignment looked normal again.
Testing
fnm exec --using=24.18.0 npm run checkScreenshots
Caret offset for empty item in bullet list:
Caret offset for empty item in numbered list:
After this change is applied: