Browse Source

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
pull/4/head
Neetshin 6 years ago
committed by Eugen Rochko
parent
commit
0c8b1eb577
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/javascript/mastodon/features/compose/components/upload.js

+ 1
- 1
app/javascript/mastodon/features/compose/components/upload.js View File

@ -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}>

Loading…
Cancel
Save