From b50b44cced491a3e210d142d0d024eebf3a084c0 Mon Sep 17 00:00:00 2001 From: Alex King Date: Thu, 11 Apr 2019 22:08:03 +0200 Subject: [PATCH] Invert link 'target' check --- modules/reitit-frontend/src/reitit/frontend/history.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/reitit-frontend/src/reitit/frontend/history.cljs b/modules/reitit-frontend/src/reitit/frontend/history.cljs index e1aba76d..025141aa 100644 --- a/modules/reitit-frontend/src/reitit/frontend/history.cljs +++ b/modules/reitit-frontend/src/reitit/frontend/history.cljs @@ -92,7 +92,8 @@ (not (.-ctrlKey e)) (not (.-metaKey e)) (not (.-shiftKey e)) - (not (contains? #{"_blank" "_self"} (.getAttribute el "target"))) + (or (not (.hasAttribute el "target")) + (contains? #{"" "_self"} (.getAttribute el "target"))) ;; Left button (= 0 (.-button e)) ;; isContentEditable property is inherited from parents,