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.
In Brackets, to implement our "inline editor" feature, we create line widgets that contain nested CodeMirror instances. The nested CMs are height: auto, and we automatically set the size of the containing line widget to match the height of the nested CM, e.g. if the wrapping changes. This used to work fine, but has a bug in CMv4.
Here's a standalone repro case:
If on Mac, in System Preferences > General set "Show scroll bars:" to "Always" (or use a mouse); on Windows, this shouldn't be necessary
Resize the window a bit to get the line widget to appear (not sure why this is necessary)
Double-click on "background" in the line widget to select it
Resize the window narrower until the "font-family" line starts to wrap
Slowly resize the window wider just past the point where the "font-family line" should no longer wrap
Result:
The text at the end flickers between wrapping and not wrapping.
The selection below the wrapped text jumps around between lines as you resize.
It seems as though CM's idea of what text is wrapped is different from the browser's own line wrapping.
This problem seems to have been introduced by 2007b3c.
Also note that on Mac it only reproduces if scrollbars are always visible, so it's probably somehow related to the layout of the fake scrollbar somehow (though in this case the scrollbar should never be visible because the widget is always sized to the content height, it could be that there's some timing problem where the scrollbar is briefly visible).
In Brackets, to implement our "inline editor" feature, we create line widgets that contain nested CodeMirror instances. The nested CMs are
height: auto, and we automatically set the size of the containing line widget to match the height of the nested CM, e.g. if the wrapping changes. This used to work fine, but has a bug in CMv4.Here's a standalone repro case:
Result:
It seems as though CM's idea of what text is wrapped is different from the browser's own line wrapping.
This problem seems to have been introduced by 2007b3c.
Also note that on Mac it only reproduces if scrollbars are always visible, so it's probably somehow related to the layout of the fake scrollbar somehow (though in this case the scrollbar should never be visible because the widget is always sized to the content height, it could be that there's some timing problem where the scrollbar is briefly visible).