Merge pull request #6117 from SimonBrandner/fix/down-arrow-edit/17491

Clear stored editor state when canceling editing using a shortcut
This commit is contained in:
J. Ryan Stinnett 2021-06-01 12:07:23 +01:00 committed by GitHub
commit 173b0e9d78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -168,6 +168,7 @@ export default class EditMessageComposer extends React.Component {
if (nextEvent) { if (nextEvent) {
dis.dispatch({action: 'edit_event', event: nextEvent}); dis.dispatch({action: 'edit_event', event: nextEvent});
} else { } else {
this._clearStoredEditorState();
dis.dispatch({action: 'edit_event', event: null}); dis.dispatch({action: 'edit_event', event: null});
dis.fire(Action.FocusComposer); dis.fire(Action.FocusComposer);
} }