You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 16, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 16, 2026. It is now read-only.
Line heights are calculated wrong with zero-width marker in Firefox #5755
This happens when you try to make a TextMarker with replacedWith that a) spans the entire line and b) has zero width.
It works fine in Chrome, but in Firefox it messes up line height calculations and the cursor appears in the wrong place when you try to put it below the marker.
(Note that Chrome renders the line with the marker with normal line height, whereas Firefox renders it with no height. It makes sense to me that this is a weird thing to do and the resulting line height may be undefined--the bug is that the cursor placement is inconsistent with the apparent line height.)
Attached patch somewhat fixes this—the line numbers will still overlap when a visible line ends up being less high than a line number, but at least the height calculations will make sense. Does that help?
That sounds great, thanks! I've been using CSS to hide the line numbers on such collapsed lines so that isn't a problem. Maybe auto-hiding the line number or something could be a separate issue but I'll close this one.
Activity
Remove kludge in line height measuring
marijnh commentedon Feb 19, 2019
Attached patch somewhat fixes this—the line numbers will still overlap when a visible line ends up being less high than a line number, but at least the height calculations will make sense. Does that help?
thomasjm commentedon Feb 20, 2019
That sounds great, thanks! I've been using CSS to hide the line numbers on such collapsed lines so that isn't a problem. Maybe auto-hiding the line number or something could be a separate issue but I'll close this one.
Remove kludge in line height measuring
Update from master (#1)