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

Message editing: dont jump to next part when inserting at *start* of uneditable part
pull/21833/head
Bruno Windels 2019-05-24 10:11:44 +00:00 提交者 GitHub
当前提交 3c778e80b0
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 3 次插入2 次删除

查看文件

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