Skip to content

Commit

Permalink
Only trigger x-navigate on left click
Browse files Browse the repository at this point in the history
  • Loading branch information
calebporzio committed Aug 8, 2023
1 parent 8677f6b commit df92140
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/navigate/src/links.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export function whenThisLinkIsPressed(el, callback) {
el.addEventListener('click', e => e.preventDefault())

el.addEventListener('mousedown', e => {
if (e.button !== 0) return; // Only on left click...

e.preventDefault()

callback((whenReleased) => {
Expand Down

0 comments on commit df92140

Please sign in to comment.