From 63483ee543eb6c81e2cf6450a682cdb657e92751 Mon Sep 17 00:00:00 2001 From: Neil Moore Date: Sun, 26 May 2019 07:48:45 -0400 Subject: [PATCH] Create new click handler for status__expand area in status (#10837) This click handler only activates on left-click, resolving #10798. This matches behavior in status_content.js, as added in #536 --- app/javascript/mastodon/components/status.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index 2d3a32d62..b67354b01 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -166,6 +166,17 @@ class Status extends ImmutablePureComponent { this.context.router.history.push(`/statuses/${status.getIn(['reblog', 'id'], status.get('id'))}`); } + handleExpandClick = (e) => { + if (e.button === 0) { + if (!this.context.router) { + return; + } + + const { status } = this.props; + this.context.router.history.push(`/statuses/${status.getIn(['reblog', 'id'], status.get('id'))}`); + } + } + handleAccountClick = (e) => { if (this.context.router && e.button === 0 && !(e.ctrlKey || e.metaKey)) { const id = e.currentTarget.getAttribute('data-id'); @@ -395,7 +406,7 @@ class Status extends ImmutablePureComponent { {prepend}
-
+