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
lolsob-rspec
Neetshin 2017-12-12 18:57:22 +00:00 committed by Eugen Rochko
parent a40aff8dbc
commit 9a7fb53a7f
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ export default class Upload extends ImmutablePureComponent {
render () { render () {
const { intl, media } = this.props; const { intl, media } = this.props;
const active = this.state.hovered || this.state.focused; 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 ( return (
<div className='compose-form__upload' onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}> <div className='compose-form__upload' onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>