Skip to content

Commit

Permalink
Need to specify firedAfterTextChanged on all Aztec events
Browse files Browse the repository at this point in the history
  • Loading branch information
hypest committed Apr 25, 2019
1 parent 46e086d commit 9c298c8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ export class RichText extends Component {
const contentWithoutRootTag = this.removeRootTagsProduceByAztec( unescapeSpaces( event.nativeEvent.text ) );
this.lastContent = contentWithoutRootTag;
this.comesFromAztec = true;
this.firedAfterTextChanged = true; // the onChange event always fires after the fact
this.props.onChange( this.lastContent );
}

Expand Down Expand Up @@ -491,6 +492,7 @@ export class RichText extends Component {
// let's update lastContent to prevent that in shouldComponentUpdate
this.lastContent = newContent;
this.comesFromAztec = true;
this.firedAfterTextChanged = true; // Selection change event always fires after the fact
this.props.onChange( this.lastContent );
}
}
Expand Down

0 comments on commit 9c298c8

Please sign in to comment.