diff --git a/app/assets/javascripts/discourse/app/widgets/link.js b/app/assets/javascripts/discourse/app/widgets/link.js index dc2d52e143f..63452b05202 100644 --- a/app/assets/javascripts/discourse/app/widgets/link.js +++ b/app/assets/javascripts/discourse/app/widgets/link.js @@ -97,14 +97,18 @@ export default createWidget("link", { ); } } - return result; }, click(e) { + if (this.attrs.attributes && this.attrs.attributes.target === "_blank") { + return; + } + if (wantsNewWindow(e)) { return; } + e.preventDefault(); if (this.attrs.action) {