diff --git a/src/lightgallery.ts b/src/lightgallery.ts index 7bdd2eb25..5a95c0b8d 100644 --- a/src/lightgallery.ts +++ b/src/lightgallery.ts @@ -2126,12 +2126,12 @@ export class LightGallery { } if (e.deltaY > 0) { - this.goToPrevSlide(); - } else { this.goToNextSlide(); + e.preventDefault(); + } else if (e.deltaY < 0) { + this.goToPrevSlide(); + e.preventDefault(); } - - e.preventDefault(); }); }