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

Fixes horizontal scrolling #76

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

asos-VasilisKortsimelidis
Copy link

@asos-VasilisKortsimelidis asos-VasilisKortsimelidis commented Mar 17, 2022

Fixes #50

Similarly with the code already there, check if the element has overflow-x scroll or auto and let it scroll 😅

@lazd
Copy link
Owner

lazd commented Mar 17, 2022

@asos-VasilisKortsimelidis a couple things to check:

  1. Does it scroll horizontally when you're scrolled to the top or bottom of the element, or is horizontal scrolling prevented?
  2. Does it make the screen bounce, either horizontally or vertically?

@asos-VasilisKortsimelidis
Copy link
Author

@lazd hmm ok seems it let it bounce now, oops! let me have a better look and I will update

@lazd
Copy link
Owner

lazd commented Mar 17, 2022

@asos-VasilisKortsimelidis yeah, this is a really tough one, see the issue for previous attempts. I honestly thing 2-axis scrolling without bounce shouldn't be possible, and that we should focus on making either vertical or horizontal scrolling work without bounce.

Had also forgotten to set the actual overflowX variable
@asos-VasilisKortsimelidis
Copy link
Author

asos-VasilisKortsimelidis commented Mar 17, 2022

@lazd thanks for your response.

In my case when I initialise iNoBounce I'm not able to scroll horizontally on an element. At this point I don't care if it's bouncing horizontally (on that particular element).

My latest commit fixes that. You still get no bounce vertically but let's the element scroll horizontally. Thoughts? :)

@lazd
Copy link
Owner

lazd commented Mar 17, 2022

Does horizontal scrolling work when you're scrolled to the top and bottom of the element?

@asos-VasilisKortsimelidis
Copy link
Author

Does horizontal scrolling work when you're scrolled to the top and bottom of the element?

It does indeed. I'm not sure of other edge cases you probably are though.

I will patch it for our project but maybe we can leave the PR open and see if more people are happy with the solution.

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.

iNoBounce breaks horizontal scrolling
2 participants