Skip to content

Commit a7601c0

Browse files
committed
fix(middle-click): Allow middle click on links
We let middle clicks go through
1 parent 1f3cee4 commit a7601c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/utils.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ function isDomElement(o) {
5050
}
5151

5252
function isSpecialClick(event) {
53-
return event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
53+
let isMiddleClick = (event.button === 1);
54+
return isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
5455
}
5556

5657
/**

0 commit comments

Comments
 (0)