Skip to content

Commit a698bfa

Browse files
ENGCOM-4664: Fix issues inserting Widgets with nested WYSIWYGs #20174
- Merge Pull Request #20174 from molovo/magento2:patch-1 - Merged commits: 1. 3bcf0d8 2. d4e0c28
2 parents 60e3a73 + d4e0c28 commit a698bfa

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)