Merge pull request #3393 from matrix-org/bwindels/cider-fix-lastcaret

New composer: fix needing to push arrow-up twice after sending first message after switching to a room
This commit is contained in:
Bruno Windels 2019-09-06 09:22:10 +00:00 committed by GitHub
commit 6b104f6344
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 7 deletions

View file

@ -149,6 +149,9 @@ export default class EditorModel {
reset(serializedParts, caret, inputType) {
this._parts = serializedParts.map(p => this._partCreator.deserializePart(p));
if (!caret) {
caret = this.getPositionAtEnd();
}
// close auto complete if open
// this would happen when clearing the composer after sending
// a message with the autocomplete still open