about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-10-26 16:46:53 +0200
committerThibG <thib@sitedethib.com>2018-10-27 19:06:49 +0200
commit8f4fab65a1ebc8296cb398fb3ce4144dcf264f35 (patch)
tree6948c64b591a058ebbcb266cadef01559588b3a4 /app/javascript
parent0e8de56a22aee089da8aa1c64bab941bc5911e5d (diff)
Do not rely on hover for upload form options if touch is used
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/flavours/glitch/features/composer/upload_form/item/index.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/composer/upload_form/item/index.js b/app/javascript/flavours/glitch/features/composer/upload_form/item/index.js
index 5addccfb1..93fa4e39e 100644
--- a/app/javascript/flavours/glitch/features/composer/upload_form/item/index.js
+++ b/app/javascript/flavours/glitch/features/composer/upload_form/item/index.js
@@ -14,6 +14,7 @@ import IconButton from 'flavours/glitch/components/icon_button';
 //  Utils.
 import Motion from 'flavours/glitch/util/optional_motion';
 import { assignHandlers } from 'flavours/glitch/util/react_helpers';
+import { isUserTouching } from 'flavours/glitch/util/is_mobile';
 
 //  Messages.
 const messages = defineMessages({
@@ -130,7 +131,7 @@ export default class ComposerUploadFormItem extends React.PureComponent {
       hovered,
       dirtyDescription,
     } = this.state;
-    const active = hovered || focused;
+    const active = hovered || focused || isUserTouching();
     const computedClass = classNames('composer--upload_form--item', { active });
     const x = ((focusX /  2) + .5) * 100;
     const y = ((focusY / -2) + .5) * 100;