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.
Browser zoom down make issue with CodeMirror look #6258
CodeMirror's scroll hack currently assumes scrollbars are always narrower than 30 pixels. It seems that when you zoom out enough, that assumption is violated.
Attached patch increases this to 50px, pushing the zoom level at which the problem appears further back. Does that suffice for your use case? I'm a bit worried that setting a really big value here is going to have unexpected side effects.
Thank you for your response.
Thats definetely the reason.
I did the changes in node_modules/codemirror/… as you shown in your commit.
This is frame with 10px variable:
This is frame with 50px variable:
And this is with 200px variable:
All with minimum 25% zoom:
Don't suggest right frame but only bottom because there is dragging panel in the right side in my case:
So I think 200px is good enough in case when you zoom out 25%, and it may be good solution for now.
But still probably it should be solved somehow more realiable than this if it is possible.
Also I suggest to use SASS or SCSS variables instead changing one size in 5 places.
I'm a bit worried that setting a really big value here is going to have unexpected side effects.
Indeed, this did have unintended side-effects -- well for me.
After 3 hours of debugging, I finally identified this change as the cause of my "horizontal scrollbar showing when it should not" headaches. 🤦
However, on further inspection just now, it appears it's not an issue in codemirror -- rather, it's that my project was importing two copies of codemirror. One version was before the change above, and one was after -- meaning one was using the 30px scroll-hack thickness, and the other was using 50px.
That broke the "scrollbar concealing" system, because I was importing the css of the 30px version, but the code of the 50px version, causing the css-based margin-bottom and padding-bottom to not be high enough to compensate for the extra size of the code-based cm.display.heightForcer element.
Anyway, posting this here in case anyone else made the same mistake, and hits the same issue I did...
Activity
Increase size of scrollbar-hack gap
marijnh commentedon May 4, 2020
CodeMirror's scroll hack currently assumes scrollbars are always narrower than 30 pixels. It seems that when you zoom out enough, that assumption is violated.
Attached patch increases this to 50px, pushing the zoom level at which the problem appears further back. Does that suffice for your use case? I'm a bit worried that setting a really big value here is going to have unexpected side effects.
gkucmierz commentedon May 8, 2020
Thank you for your response.
Thats definetely the reason.
I did the changes in
node_modules/codemirror/…as you shown in your commit.This is frame with 10px variable:
This is frame with 50px variable:

And this is with 200px variable:
All with minimum 25% zoom:
Don't suggest right frame but only bottom because there is dragging panel in the right side in my case:
So I think 200px is good enough in case when you zoom out 25%, and it may be good solution for now.
But still probably it should be solved somehow more realiable than this if it is possible.
Also I suggest to use SASS or SCSS variables instead changing one size in 5 places.
Increase size of scrollbar-hack gap; Issue codemirror#6258
Venryx commentedon Jun 19, 2020
Indeed, this did have unintended side-effects -- well for me.
After 3 hours of debugging, I finally identified this change as the cause of my "horizontal scrollbar showing when it should not" headaches. 🤦
However, on further inspection just now, it appears it's not an issue in codemirror -- rather, it's that my project was importing two copies of codemirror. One version was before the change above, and one was after -- meaning one was using the 30px scroll-hack thickness, and the other was using 50px.
That broke the "scrollbar concealing" system, because I was importing the css of the 30px version, but the code of the 50px version, causing the css-based
margin-bottomandpadding-bottomto not be high enough to compensate for the extra size of the code-basedcm.display.heightForcerelement.Anyway, posting this here in case anyone else made the same mistake, and hits the same issue I did...
gkucmierz commentedon Jun 22, 2020
50 pixels is still not enough to solve the issue that I described here.
akdor1154 commentedon Jul 25, 2020
FYI codemirror releases from bower have an out-of-date codemirror.css, this could be where the mismatched css/js versions are coming from.
Update/5.58.2 (#1)