You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-17 17:42:41 +03:00
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.
This commit is contained in:
@@ -183,9 +183,7 @@ export default class EditorModel {
|
|||||||
this._setActivePart(newPosition, canOpenAutoComplete);
|
this._setActivePart(newPosition, canOpenAutoComplete);
|
||||||
if (this._transformCallback) {
|
if (this._transformCallback) {
|
||||||
const transformAddedLen = this._transform(newPosition, inputType, diff);
|
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._updateInProgress = false;
|
||||||
this._updateCallback(newPosition, inputType, diff);
|
this._updateCallback(newPosition, inputType, diff);
|
||||||
|
|||||||
Reference in New Issue
Block a user