diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index fbae06159b..99d34e7194 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -121,6 +121,7 @@ define([ Common.NotificationCenter.on('uitheme:changed', this.updatePluginsButtons.bind(this)); Common.NotificationCenter.on('window:resize', this.updatePluginsButtons.bind(this)); Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this)); + Common.NotificationCenter.on('doc:mode-changed', this.onChangeDocMode.bind(this)); }, loadConfig: function(data) { @@ -1054,6 +1055,12 @@ define([ } }, + onChangeDocMode: function (type) { + if (type === 'view' && this.pluginDlg) { + this.api.asc_pluginButtonClick(-1, this.pluginDlg.guid); + } + }, + // Plugin can create windows onPluginWindowShow: function(frameId, variation) { if (variation.isVisual) {