Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jun 15, 2022. It is now read-only.

Update main.scss to add vertical Scroll Bar#14

Closed
TheodoreChu wants to merge 1 commit intostandardnotes:masterstandardnotes/code-editor:masterfrom
TheodoreChu:patch-1Copy head branch name to clipboard
Closed

Update main.scss to add vertical Scroll Bar#14
TheodoreChu wants to merge 1 commit intostandardnotes:masterstandardnotes/code-editor:masterfrom
TheodoreChu:patch-1Copy head branch name to clipboard

Conversation

@TheodoreChu
Copy link
Contributor

There's currently no vertical scroll bar. Adding this line with the Inspector adds the vertical scroll bar on my Windows 10 Desktop, Firefox, and Google Chrome web apps. I have not tested it on mobile, and I have not tried compiling the editor with this addition.

There's currently no scrolling. Adding this line with the Inspector makes scrolling work on my Windows 10 Desktop app
@TheodoreChu TheodoreChu requested a review from atmoio May 7, 2020 02:07
@atmoio
Copy link
Member

atmoio commented May 7, 2020

Hmm I never noticed that it was missing a scrollbar 🤔Although I tested this on Mac and it didn't add the scrollbar. Which platforms/browsers did you test it with?

@TheodoreChu
Copy link
Contributor Author

Here's what I have on Windows 10 Desktop app v3.4.1:

image

The scrollbar appears for me when I add the overflow-y: scroll at the same place on Google Chrome and Firefox web apps v3.3.5 (also on Windows 10)

@ningsongshen ningsongshen linked an issue Jun 18, 2020 that may be closed by this pull request
@ningsongshen
Copy link
Contributor

ningsongshen commented Jun 18, 2020

I tried the CSS change (by adding L63 in main.scss and compiling with grunt, then serving locally) on Linux Firefox and desktop, and can verify that it works well on those platforms. Not sure why it doesn't work on mac...

image

@atmoio
Copy link
Member

atmoio commented Jun 26, 2020

I do wonder why CodeMirror's default CSS has this property explicitly set to none (iirc). Perhaps they are meant to handle their own scrolling?

@TheodoreChu
Copy link
Contributor Author

TheodoreChu commented Jun 29, 2020

@mobitar , you're right, overflow is explicitly set to hidden: https://github.com/codemirror/CodeMirror/blob/master/lib/codemirror.css#L161

Maybe the missing scroll bar is a result of setting width: 100% to .CodeMirror in line 57? Disabling it with the selector also brings back the scrollbar for me on Windows Firefox and Chrome

Setting width to 100% pushes the scroll bar out since overflow is hidden. This is what it looks like with width set to 100%. Notice the padding (in purple) on the right is missing
image

This is what it looks like with width unset. I think removing the width: 100% has the same effect as width: unset:
image

@atmoio atmoio closed this in 9d63acb Jun 29, 2020
@atmoio
Copy link
Member

atmoio commented Jun 29, 2020

Oh, yeah, nice catch! Fixed in latest commit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No scrollbar in Code editor

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.