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.
[Panel] onResize does not work with panel addon and height 100% #5995
we have a div in our webapplication inside which we render codemirror with 100% height.
When not using panels the resize works fine but with a top panel we show for additional script information we face the following issue:
Assuming the browser window is so large that 50 lines fit in the editor without a scroll bar.
Resizing the window -> only 30 lines fit in the remaining space for codemirror
Expected behaviour: Codemirror should resize and show a scroll bar -> all 50 lines can be accessed
Actual behaviour: Codemirror does not resize, last 20 lines are cropped, no scrollbar appears and when you try scrolling to them the whole editor shifts inside its parent container, where it is stuck forever, even after resizing to original window size.
Additional things I observed:
The additional wrapper div that panel.js adds has no height restriction.
It will overflow the parent div (outermost div of codemirror) thus the height comparison doesn't trigger resize event.
I fiddled around with setting this wrapper to 100% height and codemirror to 100% and it made things better, but I couldn't get it to work reliably and exactly as it should.
The codemirror document in the screenshot actually contains 54 lines, but as you can see, you cannot scroll further and 18 lines are cropped of.
The software doesn't come with a guarantee that all issues will get attention. I'm not very invested in the panel addon, so if you want progress on this, your best bet is to investigate it yourself.
Activity
nkappler commentedon Sep 6, 2019
You can see it here:
https://jsfiddle.net/xt64L72a/
When you uncomment the line with myCodeMirror.addPanel(...) it works,
with the line not commented out, it doesn't work.
(Just add a few lines and start resizing the height of the viewport)
nkappler commentedon Sep 6, 2019
found out that uncommenting this two lines in panel.js fixes it in my case,
however I am not sure if it might break something else.
nkappler commentedon Oct 14, 2019
Is the issue not clear or why is this getting no attention?
marijnh commentedon Oct 14, 2019
The software doesn't come with a guarantee that all issues will get attention. I'm not very invested in the panel addon, so if you want progress on this, your best bet is to investigate it yourself.
[panel addon] Support dynamic size changes
[panel addon] Support dynamic size changes
Update from master (#1)