Skip to content

Commit

Permalink
fix: correct mousewheel navigation
Browse files Browse the repository at this point in the history
fix #1177
  • Loading branch information
sachinchoolur committed Oct 11, 2021
1 parent 4b48d35 commit 99866cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lightgallery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
}

Expand Down

0 comments on commit 99866cf

Please sign in to comment.