baianat / hooper

🎠 A customizable accessible carousel slider optimized for Vue
https://baianat.github.io/hooper/
MIT License
716 stars 133 forks source link

Navigation with multiple items to show, .hooper-next.is-disabled not happening when it should #226

Open mel0mani4 opened 3 years ago

mel0mani4 commented 3 years ago

Description I'm working on the case of a vertical carousel, with 5.5 items to show but only one item to slide. The .hooper-next button should be toggled with the .is-disabled class when the last .hooper-slide is fully visible, but instead, it happens at the last .hooper-slide totally visible + 3 clicks. Could you fix this issue please?

Expected behaviour .hooper-next.is-disabled should happen when the last slide is visible, it shouldn't be possible to continue sliding when there's no more slides to show, like a vertical scrollbar for instance.

Screenshots

Capture d’écran 2021-08-25 à 12 18 53 Capture d’écran 2021-08-25 à 12 07 40 Capture d’écran 2021-08-25 à 12 07 50

Stack I'm on desktop:

voronovam commented 1 year ago

@mel0mani4 try to use trimWhiteSpace