always recalculate position after doing transform step
as the amount of characters might not have changed, parts may still have been merged, removed or added which requires a new position.pull/21833/head
parent
0273795f5d
commit
5c28b57681
|
@ -183,9 +183,7 @@ export default class EditorModel {
|
|||
this._setActivePart(newPosition, canOpenAutoComplete);
|
||||
if (this._transformCallback) {
|
||||
const transformAddedLen = this._transform(newPosition, inputType, diff);
|
||||
if (transformAddedLen !== 0) {
|
||||
newPosition = this.positionForOffset(caretOffset + transformAddedLen, true);
|
||||
}
|
||||
newPosition = this.positionForOffset(caretOffset + transformAddedLen, true);
|
||||
}
|
||||
this._updateInProgress = false;
|
||||
this._updateCallback(newPosition, inputType, diff);
|
||||
|
|
Loading…
Reference in New Issue