Skip to content

Commit 19c7bc9

Browse files
authored
ENGCOM-4664: Fix issues inserting Widgets with nested WYSIWYGs #20174
2 parents 5afada0 + a698bfa commit 19c7bc9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/web/mage/adminhtml/wysiwyg/widget.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ define([
456456
parameters: params,
457457
onComplete: function (transport) {
458458
try {
459-
editor = wysiwyg.activeEditor();
459+
editor = wysiwyg.get(this.widgetTargetId);
460460

461461
widgetTools.onAjaxSuccess(transport);
462462
widgetTools.dialogWindow.modal('closeModal');
@@ -469,7 +469,7 @@ define([
469469
editor.selection.select(activeNode);
470470
editor.selection.setContent(transport.responseText);
471471
} else if (this.bMark) {
472-
wysiwyg.activeEditor().selection.moveToBookmark(this.bMark);
472+
editor.selection.moveToBookmark(this.bMark);
473473
}
474474
}
475475

@@ -513,7 +513,7 @@ define([
513513
* @return {null|wysiwyg.Editor|*}
514514
*/
515515
getWysiwyg: function () {
516-
return wysiwyg.activeEditor();
516+
return wysiwyg.get(this.widgetTargetId);
517517
},
518518

519519
/**

0 commit comments

Comments
 (0)