Skip to content
This repository was archived by the owner on May 23, 2018. It is now read-only.

Commit 3304fa7

Browse files
committed
chore: v0.1.4
1 parent 5a2ab71 commit 3304fa7

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

dist/amd/link-factory.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ define(['exports', 'module', 'react'], function (exports, module, _react) {
4242
},
4343

4444
clickHandler: function clickHandler(evt) {
45-
if (!evt.nativeEvent.which === 2) {
45+
var comboKey = event.metaKey || event.altKey || event.ctrlKey || event.shiftKey;
46+
47+
if (evt.button === 0 && !comboKey) {
4648
evt.preventDefault();
4749
router.navigate(this.props.routeName, this.props.routeParams, this.props.routeOptions);
4850
}

dist/browser/router5-react.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ function linkFactory(router) {
6060
},
6161

6262
clickHandler: function clickHandler(evt) {
63-
if (!evt.nativeEvent.which === 2) {
63+
var comboKey = event.metaKey || event.altKey || event.ctrlKey || event.shiftKey;
64+
65+
if (evt.button === 0 && !comboKey) {
6466
evt.preventDefault();
6567
router.navigate(this.props.routeName, this.props.routeParams, this.props.routeOptions);
6668
}

dist/browser/router5-react.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/commonjs/link-factory.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ function linkFactory(router) {
4747
},
4848

4949
clickHandler: function clickHandler(evt) {
50-
if (!evt.nativeEvent.which === 2) {
50+
var comboKey = event.metaKey || event.altKey || event.ctrlKey || event.shiftKey;
51+
52+
if (evt.button === 0 && !comboKey) {
5153
evt.preventDefault();
5254
router.navigate(this.props.routeName, this.props.routeParams, this.props.routeOptions);
5355
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "router5-react",
3-
"version": "0.1.3",
3+
"version": "0.1.4",
44
"description": "router5 helpers for React",
55
"main": "dist/commonjs/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)