From 256a10c192fd0c5dda578689863a907ab7f3afa0 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 24 Oct 2018 18:17:15 +0200 Subject: [PATCH] Show upload options on click as well as hover (#9074) Fix #8918 --- .../mastodon/features/compose/components/upload.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/features/compose/components/upload.js b/app/javascript/mastodon/features/compose/components/upload.js index 66c93452ce..a1e99dcbbd 100644 --- a/app/javascript/mastodon/features/compose/components/upload.js +++ b/app/javascript/mastodon/features/compose/components/upload.js @@ -44,11 +44,13 @@ class Upload extends ImmutablePureComponent { this.props.onSubmit(this.context.router.history); } - handleUndoClick = () => { + handleUndoClick = e => { + e.stopPropagation(); this.props.onUndo(this.props.media.get('id')); } - handleFocalPointClick = () => { + handleFocalPointClick = e => { + e.stopPropagation(); this.props.onOpenFocalPoint(this.props.media.get('id')); } @@ -68,6 +70,10 @@ class Upload extends ImmutablePureComponent { this.setState({ focused: true }); } + handleClick = () => { + this.setState({ focused: true }); + } + handleInputBlur = () => { const { dirtyDescription } = this.state; @@ -88,7 +94,7 @@ class Upload extends ImmutablePureComponent { const y = ((focusY / -2) + .5) * 100; return ( -
+
{({ scale }) => (