From 10270551c957601529734ab5d31a93929b44a60f Mon Sep 17 00:00:00 2001 From: YoheiZuho Date: Sun, 1 May 2022 18:51:47 +0900 Subject: [PATCH] fix if click name in QT can't show post owner's profile(4) --- app/javascript/mastodon/components/status.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index af59b28e5..baf83e58c 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -185,12 +185,22 @@ class Status extends ImmutablePureComponent { this.handleAccountClick(e, false); } - handleAccountClick = (e) => { + handleAccountClick = (e, proper = true) => { if (this.context.router && e.button === 0 && !(e.ctrlKey || e.metaKey)) { const id = e.currentTarget.getAttribute('data-id'); e.preventDefault(); this.context.router.history.push(`/accounts/${id}`); } + + if (e && (e.button !== 0 || e.ctrlKey || e.metaKey)) { + return; + } + + if (e) { + e.preventDefault(); + } + + this._openProfile(proper); } handleQuoteClick = () => {