New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
workaround spurious CodeMirror scrollbars #3358
Conversation
always draw scrollbar margin, so that inappropriate scrollbars never overlap the last line. To compensate for the extra space, the margin between the scrollbar and the last line is shrunk significantly.
Do we keep this, or wait for new CM workaround to be released ? I would be inclined to merged as @fperez will be doing presentation soon and might want to zoom In, even if we revert later. |
my fix is in CM master, and he's been releasing pretty consistently around the 20th of each month, so we should be safe with CM 3.14 in 1.0. I'm fine with going either way - merge this workaround now and rollback when we get CM 3.14, or just we can just post custom.css workarounds for the meantime. |
Merging to be safe. Oppened a PrioBlocker issue to remind us to revert. |
workaround spurious CodeMirror scrollbars
Fixes ipython#3397, should also be reverted when closed by ipython#3391 Cf ipython#3358 also
closes ipython#3391 For users who need to hide the scrollbars while zooming text in the meantime, you can add the following to your custom.css: ```css .CodeMirror-scroll, .CodeMirror-wrap .CodeMirror-scroll { overflow: scroll; } .CodeMirror-vscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-hscrollbar { visibility: hidden; } ```
rollback #3358 #3358 was a workaround for a CodeMirror (actually Chrome seems to be the one at fault) bug drawing scrollbars over text, when there isn't anything to scroll. The workaround was a compromise, always drawing the space for the scrollbars to prevent the overlay, but reducing the margin so it isn't quite so annoying in the ~99% of the time that there are no scrollbars. It turns out (#3397, #3399) that the margins are not reliable, so the margin adjustment could cause the very same problem. closes #3391, #3397, #3399 For users who need to hide the scrollbars while zooming text while we wait for a CodeMirror release, you can add the following to your custom.css: .CodeMirror-scroll, .CodeMirror-wrap .CodeMirror-scroll { overflow: scroll; } .CodeMirror-vscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-hscrollbar { visibility: hidden; } or just put CodeMirror master in your profile's static/components directory.
workaround spurious CodeMirror scrollbars
closes ipython#3391 For users who need to hide the scrollbars while zooming text in the meantime, you can add the following to your custom.css: ```css .CodeMirror-scroll, .CodeMirror-wrap .CodeMirror-scroll { overflow: scroll; } .CodeMirror-vscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-hscrollbar { visibility: hidden; } ```
rollback ipython#3358 ipython#3358 was a workaround for a CodeMirror (actually Chrome seems to be the one at fault) bug drawing scrollbars over text, when there isn't anything to scroll. The workaround was a compromise, always drawing the space for the scrollbars to prevent the overlay, but reducing the margin so it isn't quite so annoying in the ~99% of the time that there are no scrollbars. It turns out (ipython#3397, ipython#3399) that the margins are not reliable, so the margin adjustment could cause the very same problem. closes ipython#3391, ipython#3397, ipython#3399 For users who need to hide the scrollbars while zooming text while we wait for a CodeMirror release, you can add the following to your custom.css: .CodeMirror-scroll, .CodeMirror-wrap .CodeMirror-scroll { overflow: scroll; } .CodeMirror-vscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-hscrollbar { visibility: hidden; } or just put CodeMirror master in your profile's static/components directory.
always draw scrollbar margin, so that inappropriate scrollbars never overlap the last line. To compensate for the extra space, the margin between the scrollbar and the last line is shrunk significantly.
This is full of compromises, so we may well decide not to merge it as-is, but it does seem to mitigate the fairly catastrophic scrollbar issue when text is zoomed.
After investigation, this appears to actually be a bug in Chrome, and it's possible that CM will introduce its own workaround in a future release.