From df29ca91bd1d7a01a6696e143c19b6c9f51ef4bc Mon Sep 17 00:00:00 2001 From: Neil Moore Date: Sun, 26 May 2019 07:48:45 -0400 Subject: 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(-) (limited to 'app/javascript') diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index fb118f328..8bd4e948b 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'); @@ -394,7 +405,7 @@ class Status extends ImmutablePureComponent { {prepend}
-
+
-- cgit