Fix an issue with clearing selection when applying text properties
This commit is contained in:
Ilya Kirillov
2026-03-03 15:30:25 +03:00
parent 7ca8ffc5da
commit aa031634b0

View File

@ -7593,6 +7593,12 @@ Paragraph.prototype.Apply_TextPr = function(TextPr, IncFontSize)
if (this.Content[EndPos].IsRun())
{
this.RemoveSelection();
for (let i = 0; i < NewElements.length; ++i)
{
if (NewElements[i])
NewElements[i].RemoveSelection();
}
let centerPos = this.Internal_ReplaceRun(EndPos, NewElements);
this.Selection.Use = true;