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

Desktop: Prevent horizontal scrolling on Linux when a scrollbar is present in note list #2062

Merged
merged 2 commits into from
Nov 6, 2019

Conversation

boring10
Copy link
Contributor

@boring10 boring10 commented Nov 5, 2019

Bug fix for #1570.

Before the fix:

Bug #1570 Before

After the fix:

Bug #1570 After

@tessus
Copy link
Collaborator

tessus commented Nov 5, 2019

This is interesting, I have never seen this behavior on macOS.

Copy link
Collaborator

@tessus tessus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tessus tessus added desktop All desktop platforms linux labels Nov 5, 2019
@laurent22
Copy link
Owner

In general we simply don't want the list to scroll horizontally regardless of the content. In that case, couldn't we just set overflow-x on the list itself to "hidden"? That way, even if we change the content later on, we'll still be sure that the list won't scroll horizontally.

@boring10
Copy link
Contributor Author

boring10 commented Nov 5, 2019

I had tried the overflow-x but it did not seem to work for this case.

This way you get both the width and max-width in the CSS. The width, it appears, is being pulled from the parent container which is fine until the scrollbar appears and for some reason the Linux version doesn't like this. This is where the max-width comes in and overrides the width since the note list container now has a scrollbar that is taking up space that was not in the original assessment of the width.

@laurent22
Copy link
Owner

laurent22 commented Nov 5, 2019

Thanks for clarifying. This change seems more like a hack to go around a bug in Chrome Linux. As such please could you add the following?

  • a comment that explains that it's a hack and why it's needed
  • a link to this PR

Also please could you rename the property to 'maxWidth' and check that it still works? I think this is the correct case for this property.

@boring10
Copy link
Contributor Author

boring10 commented Nov 5, 2019

I apologize, I missed the maxWidth case on the initial commit but I had it locally after the fact. First time for me so let me know if I need to change anything else!

@laurent22
Copy link
Owner

Perfect, thanks for the update @boring10, it's good to merge now.

@laurent22 laurent22 merged commit 8d6cfdc into laurent22:master Nov 6, 2019
scoroi pushed a commit to scoroi/joplin that referenced this pull request Nov 10, 2019
…when a scrollbar is present in note list (laurent22#2062)

* Prevent horizontal scrolling on Linux when a scrollbar is present in the note list.

* max-width usage specifically to target Linux horizontal scroll problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop All desktop platforms linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants