Skip to content

fix(frontend): keep empty list item caret aligned - #230

Merged
stefan-ernst merged 1 commit into
Windshiftapp:mainfrom
codekoala:fix/milkdown-empty-list-caret
Aug 29, 2026
Merged

fix(frontend): keep empty list item caret aligned#230
stefan-ernst merged 1 commit into
Windshiftapp:mainfrom
codekoala:fix/milkdown-empty-list-caret

Conversation

@codekoala

Copy link
Copy Markdown
Contributor

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-trailingBreak from 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 check
  • Verified locally in a deployed Windshift instance by creating a new empty bullet item in a work item description.

Screenshots

Caret offset for empty item in bullet list:

image

Caret offset for empty item in numbered list:

image

After this change is applied:

image image

@stefan-ernst stefan-ernst left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you! Lets get it merged

@stefan-ernst
stefan-ernst merged commit 57fd0cb into Windshiftapp:main Aug 29, 2026
20 checks passed
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.

2 participants