Merge pull request #1358 from SkylerLipthay/patch-1
[rewrite] Ignore modifier+click and middle click in m.route.link
This commit is contained in:
commit
912d4a303d
1 changed files with 1 additions and 0 deletions
|
|
@ -112,6 +112,7 @@ module.exports = function($window) {
|
||||||
function link(vnode) {
|
function link(vnode) {
|
||||||
vnode.dom.setAttribute("href", prefix + vnode.attrs.href)
|
vnode.dom.setAttribute("href", prefix + vnode.attrs.href)
|
||||||
vnode.dom.onclick = function(e) {
|
vnode.dom.onclick = function(e) {
|
||||||
|
if (e.ctrlKey || e.metaKey || e.shiftKey || e.which === 2) return
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
e.redraw = false
|
e.redraw = false
|
||||||
var href = this.getAttribute("href")
|
var href = this.getAttribute("href")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue