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

Incorrect dragging behavior #48

Closed
katriellucas opened this issue Jul 27, 2022 · 2 comments · Fixed by #49
Closed

Incorrect dragging behavior #48

katriellucas opened this issue Jul 27, 2022 · 2 comments · Fixed by #49
Assignees
Labels
bug Something isn't working

Comments

@katriellucas
Copy link

Describe the bug
Incorrect behavior when dragging slider on its first and last slide, of course this only happens if you are using the extended version of the lib.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://swiffyslider.com/configuration/?slider-nav-mousedrag=slider-nav-mousedrag'
  2. On the first image, drag the slider from left to right.
  3. You will briefly see the second image on the slider, like we were dragging it from right to left, the reverse also happens if we are on the last image of the slider

Expected behavior
Either nothing or the slingshot effect, where you try to drag the slider, but as you release, it returns to its original position.

Screenshots
Recording 2022-07-27 at 00 34 27

Desktop

  • OS: Windows 11
  • Browser: Brave (Chromium)
  • Version: 1.41.100 Chromium: 103.0.5060.134 (Official Build) (64-bit)
@nicped nicped self-assigned this Jul 27, 2022
@nicped nicped added the bug Something isn't working label Jul 27, 2022
@nicped
Copy link
Member

nicped commented Jul 27, 2022

Good catch. Seems to happen when you drag longer than 1.8x the slide width on first or last slide. So a situation that was not handled by the script.

I have made a small change to take this into consideration.

@nicped nicped linked a pull request Jul 27, 2022 that will close this issue
nicped added a commit that referenced this issue Jul 27, 2022
Fix drag issue Incorrect dragging behavior #48
@nicped
Copy link
Member

nicped commented Jul 27, 2022

You can test on the examples page - remember to clear your browser cache.
Still needs to be released to NPM - waiting for a verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants