Merge pull request #3380 from matrix-org/bwindels/cider-fix-dirty-flag-without-input-event

New composer: allow submitting after inserting newline
pull/21833/head
Bruno Windels 2019-09-02 14:59:18 +00:00 committed by GitHub
commit de9f923e36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -175,6 +175,7 @@ export default class BasicMessageEditor extends React.Component {
const newText = text.substr(0, caret.offset) + textToInsert + text.substr(caret.offset);
caret.offset += textToInsert.length;
this.props.model.update(newText, inputType, caret);
this._modifiedFlag = true;
}
// this is used later to see if we need to recalculate the caret