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

Prevent vertical scrolling when actively dragging the slider #46

Open
arthureberledev opened this issue Feb 7, 2023 · 3 comments
Open

Comments

@arthureberledev
Copy link

arthureberledev commented Feb 7, 2023

When scrolling horizontally, vertical scrolling is disabled. But when scrolling vertically, horizontal is still possible. This leads to some weird scroll behavior on mobile devices as it can be seen in the video below.

Also, when doing this you get following error in console:
[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.

I first demonstrate the vertical scroll locking and afterwards the possible bug:

screen-capture.webm
@arthureberledev arthureberledev changed the title Prevent vertical scrolling when scrolling horizontally Prevent vertical scrolling when actively dragging the slider Feb 7, 2023
@Chaciej
Copy link

Chaciej commented Mar 14, 2023

Yes, I finished implementing it, was happy about just everything and then noticed this weird behavior, as you grab it and try to scroll vertical it starts scrolling horizontal but gets like 2-3 FPS while scrolling left-right together with document scrolling up-down, finally getting [Intervention] error

Did you manage to fix it somehow?

@arthureberledev
Copy link
Author

arthureberledev commented Mar 16, 2023

Yes, I finished implementing it, was happy about just everything and then noticed this weird behavior, as you grab it and try to scroll vertical it starts scrolling horizontal but gets like 2-3 FPS while scrolling left-right together with document scrolling up-down, finally getting [Intervention] error

Did you manage to fix it somehow?

Sadly not, i have replaced the slider with a different one for the time being.

@SuddenDev
Copy link

I have the same issue.

@MananTank Do you have an idea how to fix that issue? I think we'd need a check if it's actually an horizontal swipe or a vertical scroll motion / swipe on mobile. Because this seems to break the entire thing on mobile devices.

Maybe I'll give it a shot later and put in a pr.

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

No branches or pull requests

3 participants