From bd31573005f0e284c78a454a07b34f74a81d6474 Mon Sep 17 00:00:00 2001 From: "Julia.Svinareva" Date: Fri, 29 Mar 2024 16:00:45 +0300 Subject: [PATCH] [common] Fix bug 66927 --- apps/common/main/lib/controller/Plugins.js | 7 +++++++ 1 file changed, 7 insertions(+) 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) {