Merge pull request #3021 from matrix-org/bwindels/typebeforefirstpill

Message editing: dont jump to next part when inserting at *start* of uneditable part
This commit is contained in:
Bruno Windels 2019-05-24 10:11:44 +00:00 committed by GitHub
commit 3c778e80b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -232,8 +232,9 @@ export default class EditorModel {
index += 1;
this._insertPart(index, splitPart);
}
} else {
// not-editable, insert str after this part
} else if (offset !== 0) {
// not-editable part, caret is not at start,
// so insert str after this part
addLen += part.text.length - offset;
index += 1;
}