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

Commit

Permalink
feat: improve decision to handle click or not
Browse files Browse the repository at this point in the history
troch committed Aug 28, 2015
1 parent 6092808 commit 5a2ab71
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/link-factory.js
Original file line number Diff line number Diff line change
@@ -40,7 +40,9 @@ function linkFactory(router) {
},

clickHandler(evt) {
if (!evt.nativeEvent.which === 2) {
let comboKey = event.metaKey || event.altKey || event.ctrlKey || event.shiftKey;

if (evt.button === 0 && !comboKey) {
evt.preventDefault()
router.navigate(this.props.routeName, this.props.routeParams, this.props.routeOptions)
}

0 comments on commit 5a2ab71

Please sign in to comment.