Ignore modifier+click and middle click in m.route.link
Currently, middle clicking and ctrl+click change the route in the current tab. Expected behavior is to open a new tab/window.
This commit is contained in:
parent
4b01d1dfd4
commit
27e98e6fc3
1 changed files with 1 additions and 0 deletions
|
|
@ -112,6 +112,7 @@ module.exports = function($window) {
|
|||
function link(vnode) {
|
||||
vnode.dom.setAttribute("href", prefix + vnode.attrs.href)
|
||||
vnode.dom.onclick = function(e) {
|
||||
if (e.ctrlKey || e.metaKey || e.shiftKey || e.which === 2) return
|
||||
e.preventDefault()
|
||||
e.redraw = false
|
||||
var href = this.getAttribute("href")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue