Skip to content

Commit

Permalink
fix trigger of page transition only for click of left mouse button (F…
Browse files Browse the repository at this point in the history
…irefox only issue)
  • Loading branch information
gmrchk committed Nov 1, 2018
1 parent dbf5caf commit 2907038
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ export default class Swup {
linkClickHandler (event) {
// no control key pressed
if (!event.metaKey) {
// index of pressed button needs to be checked because Firefox triggers click on all mouse buttons
if (event.button === 0) {
this.triggerEvent('clickLink', event)
var link = new Link()
Expand Down

0 comments on commit 2907038

Please sign in to comment.