Description
In Firefox, the caret next to the placeholder in the markup editor is shorter
than the editor line height.
Steps to reproduce
- Open the Playground story in markup mode.
- Select all existing content and delete it.
- Compare the caret height immediately after deletion and after clicking the placeholder.
Actual behavior
The caret is shorter than the line height immediately after the content is deleted.
Its height changes after clicking the placeholder.
Expected behavior
The caret should have the same height before and after clicking the placeholder,
matching its behavior in Chrome and Safari.
Environment
- Firefox: 153.0
- OS: macOS
- Markdown Editor: 15.46.0
Additional context
CodeMirror places .cm-widgetBuffer before .cm-placeholder and aligns it with
vertical-align: text-top. Using vertical-align: baseline fixes the caret
metrics in Firefox.
Related Gecko issue:
https://bugzilla.mozilla.org/show_bug.cgi?id=904846
Description
In Firefox, the caret next to the placeholder in the markup editor is shorter
than the editor line height.
Steps to reproduce
Actual behavior
The caret is shorter than the line height immediately after the content is deleted.
Its height changes after clicking the placeholder.
Expected behavior
The caret should have the same height before and after clicking the placeholder,
matching its behavior in Chrome and Safari.
Environment
Additional context
CodeMirror places
.cm-widgetBufferbefore.cm-placeholderand aligns it withvertical-align: text-top. Usingvertical-align: baselinefixes the caretmetrics in Firefox.
Related Gecko issue:
https://bugzilla.mozilla.org/show_bug.cgi?id=904846