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

Slide bug with touch scroll #465

Closed
TheDelta opened this issue Sep 18, 2022 · 7 comments · Fixed by #476
Closed

Slide bug with touch scroll #465

TheDelta opened this issue Sep 18, 2022 · 7 comments · Fixed by #476
Labels

Comments

@TheDelta
Copy link

What is the expected behavior?

When I touch the image, it should not move.
When I touch and move down / up, it shouldn't try to switch to the next item.

What is the current behavior?

Once i touch and move, it will try to slide to the next

What are the steps to reproduce?

https://stackblitz.com/edit/ngx-gallery

open the starter with a smartphone and try to scroll down in google chrome.

Another way to see the odd slide glitch is to open the lightbox, an touch and move up/down at the right side (below the arrow button).

What is the use-case or motivation for changing an existing behavior?

To support a nice user experience, it slide unless a tiny threshold is reached to left/right slide.

Which versions are you using for the following packages?

(the ones in the StackBlitz starter)

Is there anything else we should know?

Eventually this makes sense to fix with the replacement of hammerjs (#452) or it might be already fixed with it.

@davide1995
Copy link

davide1995 commented Sep 29, 2022

Same problem here.
In my project, I am experiencing this problem with scrolling through a gallery and I have noticed that the https://ngx-gallery.netlify.app/#/gallerize demo has the same problem. As soon as I scroll with my finger on the gallery, the next image bounces back and then shows the current one again. Below is a video of the problem encountered

Screen_Recording_20220929_235253_Chrome.mp4

@davide1995
Copy link

The same problem occurs when resizing the window with a PC as shown in the below video. There is probably some problem with the gestures

Untitled.mp4

@MurhafSousli
Copy link
Owner

MurhafSousli commented Oct 4, 2022

This is now fixed in v7.1.2, thanks for opening the issue!

I added a new option reserveGesturesAction which blocks the page from accidently scrolling when user is not accurately sliding the gallery, this option is true by default when using the lightbox.

@MurhafSousli
Copy link
Owner

The same problem occurs when resizing the window with a PC as shown in the below video. There is probably some problem with the gestures

Untitled.mp4

Actually this is not related to the same bug, but it is valid issue

@davide1995
Copy link

The same problem occurs when resizing the window with a PC as shown in the below video. There is probably some problem with the gestures
Untitled.mp4

Actually this is not related to the same bug, but it is valid issue

Should I write an other issue just for this problem?

@MurhafSousli
Copy link
Owner

@davide1995 In v7.1.2 it was enhanced, now it goes back to the correct slide, but that effect of sliding won't be fixed easily, at least to my knowledge. check out how it behaves with the new version, I think it is acceptable now.

@davide1995
Copy link

@davide1995 In v7.1.2 it was enhanced, now it goes back to the correct slide, but that effect of sliding won't be fixed easily, at least to my knowledge. check out how it behaves with the new version, I think it is acceptable now.

Yes, the scroll issue was solved with version 7.1.2 thank you. In my opinion, however, I think that by resizing the window the user should remain focused on the current side. But no problem, it's just a detail. Otherwise if I have time I'll propose a solution with a pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants