Fixes Ctrl/Cmd not opening links in new tab.
This commit is contained in:
parent
7baae0bde0
commit
dbb3d5c7c1
1 changed files with 7 additions and 5 deletions
|
|
@ -77,7 +77,9 @@ when defined(js):
|
||||||
# Fire the popState event.
|
# Fire the popState event.
|
||||||
dom.dispatchEvent(dom.window, dom.newEvent("popstate"))
|
dom.dispatchEvent(dom.window, dom.newEvent("popstate"))
|
||||||
|
|
||||||
proc anchorCB*(e: kdom.Event, n: VNode) = # TODO: Why does this need disamb?
|
proc anchorCB*(e: Event, n: VNode) =
|
||||||
|
let mE = e.MouseEvent
|
||||||
|
if not (mE.metaKey or mE.ctrlKey):
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
|
||||||
# TODO: Why does Karax have it's own Node type? That's just silly.
|
# TODO: Why does Karax have it's own Node type? That's just silly.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue