diff --git a/src/Akeneo/Platform/Bundle/UIBundle/Resources/public/js/product/field/wysiwyg-field.js b/src/Akeneo/Platform/Bundle/UIBundle/Resources/public/js/product/field/wysiwyg-field.js index dbd630edf3e6..4f49ad0d1e30 100644 --- a/src/Akeneo/Platform/Bundle/UIBundle/Resources/public/js/product/field/wysiwyg-field.js +++ b/src/Akeneo/Platform/Bundle/UIBundle/Resources/public/js/product/field/wysiwyg-field.js @@ -25,7 +25,7 @@ define( fieldTemplate: _.template(fieldTemplate), events: { 'change .field-input:first textarea:first': 'updateModel', - 'click .note-insert': 'moveModalBackdrop' + 'click .note-insert': 'setStyleForLinkModal' }, /** @@ -40,7 +40,6 @@ define( */ postRender: function () { this.$('textarea').summernote({ - onToolbarClick: this.setStyleForLinkModal, disableResizeEditor: true, height: 200, iconPrefix: 'icon-', @@ -107,10 +106,13 @@ define( * @param jqueryEvent */ setStyleForLinkModal: function (jqueryEvent) { + this.moveModalBackdrop(); + const source = $(jqueryEvent.originalEvent.path[0]); if ( source.hasClass('icon-link') + || source.hasClass('icon-edit') || (source.hasClass('btn-sm') && ('showLinkDialog' === source.data('event'))) ) { const editor = source.closest('.note-editor');