diff --git a/app/assets/javascripts/discourse/widgets/home-logo.js.es6 b/app/assets/javascripts/discourse/widgets/home-logo.js.es6 index 408b7da13b0..4f95c85a982 100644 --- a/app/assets/javascripts/discourse/widgets/home-logo.js.es6 +++ b/app/assets/javascripts/discourse/widgets/home-logo.js.es6 @@ -1,11 +1,15 @@ -import DiscourseURL from 'discourse/lib/url'; import { createWidget } from 'discourse/widgets/widget'; import { h } from 'virtual-dom'; import { iconNode } from 'discourse/helpers/fa-icon'; +import interceptClick from 'discourse/lib/intercept-click'; export default createWidget('home-logo', { tagName: 'div.title', + settings: { + href: '/' + }, + logo() { const { siteSettings } = this; const mobileView = this.site.mobileView; @@ -33,15 +37,8 @@ export default createWidget('home-logo', { }, html() { - return h('a', { attributes: { href: "/", 'data-auto-route': true } }, this.logo()); + return h('a', { attributes: { href: this.settings.href } }, this.logo()); }, - click(e) { - if (e.shiftKey || e.metaKey || e.ctrlKey || e.button !== 0) { return true; } - - e.preventDefault(); - - DiscourseURL.routeTo("/"); - return false; - } + click: interceptClick });