Fixes Ctrl/Cmd not opening links in new tab.

This commit is contained in:
Dominik Picheta 2018-05-24 14:15:53 +01:00
commit dbb3d5c7c1

View file

@ -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.