Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Message editing: dont jump to next part when inserting at *start* of uneditable part #3021

Merged
merged 1 commit into from
May 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/editor/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down