Skip to content

Commit

Permalink
Fix bug #63721
Browse files Browse the repository at this point in the history
Fix correctEnterText method for slide editor
  • Loading branch information
KirillovIlya committed Oct 10, 2023
1 parent 454a21f commit 38d19de
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions slide/Editor/Format/Presentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -7818,7 +7818,14 @@ CPresentation.prototype.Set_DocumentDefaultTab = function (DTab) {
CPresentation.prototype.SetDocumentMargin = function () {

};
CPresentation.prototype.EnterText = function (codePoints) {
CPresentation.prototype.EnterText = function (value) {
if (undefined === value
|| null === value
|| (Array.isArray(value) && !value.length))
return false;

let codePoints = typeof(value) === "string" ? value.codePointsArray() : value;

if (!this.CanEdit())
return false;

Expand Down Expand Up @@ -7928,7 +7935,7 @@ CPresentation.prototype.CorrectEnterText = function (oldValue, newValue) {
if (!run)
return false;

if (!this.History.checkAsYouTypeEnterText(run, inRunPos, oldCodePoints[oldCodePoints.length - 1]))
if (!AscWord.checkAsYouTypeEnterText(run, inRunPos, oldCodePoints[oldCodePoints.length - 1]))
return false;

if (undefined === newCodePoints || null === newCodePoints)
Expand Down

0 comments on commit 38d19de

Please sign in to comment.