Skip to content

Commit 52c5fba

Browse files
committed
MAGETWO-91496: Instantiating WYSIWYG in DynamicRows
- Create parameter for suffix adding
1 parent 40fdf50 commit 52c5fba

File tree

2 files changed

+10
-1
lines changed
  • app/code/Magento/Ui/view/base/web/js/form/element
  • lib/internal/Magento/Framework/Data/Form/Element

2 files changed

+10
-1
lines changed

app/code/Magento/Ui/view/base/web/js/form/element/wysiwyg.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ define([
8080
return config.name.replace(/(\.|-)/g, '_');
8181
},
8282

83+
/**
84+
* @inheritdoc
85+
*/
86+
destroy: function () {
87+
this._super();
88+
wysiwyg.removeEvents(this.wysiwygId);
89+
},
90+
8391
/**
8492
*
8593
* @returns {exports}

lib/internal/Magento/Framework/Data/Form/Element/Editor.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ protected function getInlineJs($jsSetupObject, $forceLoad)
548548
*/
549549
public function getHtmlId()
550550
{
551-
return parent::getHtmlId() . '${ $.wysiwygUniqueSuffix }';
551+
$suffix = $this->getConfig('dynamic_id') ? '${ $.wysiwygUniqueSuffix }' : '';
552+
return parent::getHtmlId() . $suffix;
552553
}
553554
}

0 commit comments

Comments
 (0)