From d908bf101da36840bcdf4ca9e13b7449e4e04cd3 Mon Sep 17 00:00:00 2001 From: Artem Vasiliev Date: Fri, 1 May 2020 18:05:36 +0300 Subject: [PATCH] FIX: an `` with a target of _blank wants a new window (#9607) ..even if it wraps an image --- app/assets/javascripts/discourse/app/lib/intercept-click.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/lib/intercept-click.js b/app/assets/javascripts/discourse/app/lib/intercept-click.js index 31a3c4666d8..fc25322a021 100644 --- a/app/assets/javascripts/discourse/app/lib/intercept-click.js +++ b/app/assets/javascripts/discourse/app/lib/intercept-click.js @@ -7,7 +7,7 @@ export function wantsNewWindow(e) { e.metaKey || e.ctrlKey || (e.button && e.button !== 0) || - (e.target && e.target.target === "_blank") + (e.currentTarget && e.currentTarget.target === "_blank") ); }