From 23465c696f02c890deacc7f448f23a4e6337eb5c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 23 May 2019 10:11:46 +0200 Subject: [PATCH] dont jump to next part when inserting at *start* of uneditable part --- src/editor/model.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/editor/model.js b/src/editor/model.js index 6b9c57a23c..fb6b417530 100644 --- a/src/editor/model.js +++ b/src/editor/model.js @@ -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; }