about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorNeetshin <neetshin@neetsh.in>2017-12-12 18:57:22 +0000
committerEugen Rochko <eugen@zeonfederated.com>2017-12-12 19:57:22 +0100
commit0c8b1eb577f11d33c27f28afdfdac807b7e27845 (patch)
tree4e8d196fb4e50371c7ca0333220757a28a36c8c6 /app/javascript
parentcfa3f55221733664004deb14f70764be4752b7bb (diff)
Make detect empty string before assign image description (#5994)
* Add aria-autocomplete='list' in Textaria

ref: https://www.w3.org/TR/wai-aria-1.1/#aria-autocomplete

* Make detect empty string brefore assign upload description
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/features/compose/components/upload.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/compose/components/upload.js b/app/javascript/mastodon/features/compose/components/upload.js
index 6ab76492a..3a3d17710 100644
--- a/app/javascript/mastodon/features/compose/components/upload.js
+++ b/app/javascript/mastodon/features/compose/components/upload.js
@@ -62,7 +62,7 @@ export default class Upload extends ImmutablePureComponent {
   render () {
     const { intl, media } = this.props;
     const active          = this.state.hovered || this.state.focused;
-    const description     = this.state.dirtyDescription || media.get('description') || '';
+    const description     = this.state.dirtyDescription || (this.state.dirtyDescription !== '' && media.get('description')) || '';
 
     return (
       <div className='compose-form__upload' onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>