Fix an issue with positions of the selection when replacing text in a run
This commit is contained in:
Ilya Kirillov
2025-10-02 13:58:15 +03:00
parent f3eb3783ef
commit 8082c9987d

View File

@ -12128,11 +12128,11 @@ ParaRun.prototype.CopyTextFormContent = function(oRun)
}
if (this.Content.length - nStart - nEnd > 0)
this.RemoveFromContent(nStart, this.Content.length - nStart - nEnd);
this.RemoveFromContent(nStart, this.Content.length - nStart - nEnd, true);
for (var nPos = nStart, nEndPos = nRunLen - nEnd; nPos < nEndPos; ++nPos)
{
this.AddToContent(nPos, oRun.Content[nPos].Copy());
this.AddToContent(nPos, oRun.Content[nPos].Copy(), true);
}
};
/**