Skip to content
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

Merged
merged 1 commit into from Jun 2, 2013
Merged

Conversation

minrk
Copy link
Member

@minrk minrk commented May 25, 2013

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.

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.
@Carreau
Copy link
Member

Carreau commented Jun 1, 2013

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.

@minrk
Copy link
Member Author

minrk commented Jun 1, 2013

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.

@Carreau
Copy link
Member

Carreau commented Jun 2, 2013

Merging to be safe. Oppened a PrioBlocker issue to remind us to revert.

Carreau added a commit that referenced this pull request Jun 2, 2013
workaround spurious CodeMirror scrollbars
@Carreau Carreau merged commit 659b907 into ipython:master Jun 2, 2013
Carreau added a commit to Carreau/ipython that referenced this pull request Jun 4, 2013
Fixes ipython#3397, should also be reverted when closed by ipython#3391
Cf ipython#3358 also
minrk added a commit to minrk/ipython that referenced this pull request Jun 4, 2013
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;
}
```
@minrk minrk mentioned this pull request Jun 4, 2013
Carreau added a commit that referenced this pull request Jun 4, 2013
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.
@minrk minrk deleted the cm-scroll branch March 31, 2014 23:36
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
workaround spurious CodeMirror scrollbars
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
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;
}
```
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants