Skip to content

Commit

Permalink
Forwardport of #12141 to 2.3-develop branch
Browse files Browse the repository at this point in the history
  • Loading branch information
serhii-balko committed Jan 24, 2018
1 parent 8e77e2f commit e9238bc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/code/Magento/Ui/view/base/web/js/form/element/wysiwyg.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ define([
component: this,
selector: 'button'
}, function (element) {
this.$wysiwygEditorButton = $(element);
this.$wysiwygEditorButton = this.$wysiwygEditorButton ?
this.$wysiwygEditorButton.add($(element)) : $(element);
}.bind(this));

return this;
Expand Down Expand Up @@ -94,7 +95,7 @@ define([
this.$wysiwygEditorButton.attr('disabled', status);

/* eslint-disable no-undef */
if (wysiwygAdapter) {
if (wysiwygAdapter && wysiwygAdapter.activeEditor()) {
_.each(wysiwygAdapter.activeEditor().controlManager.controls, function (property, index, controls) {
controls[property.id].setDisabled(status);
});
Expand Down

0 comments on commit e9238bc

Please sign in to comment.