From f833d75663383bd026492632865fe540b3b96455 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 29 Oct 2020 15:12:49 +0300 Subject: [PATCH] Fix Bug 47168 --- apps/documenteditor/main/app/view/FileMenuPanels.js | 7 +++++-- apps/presentationeditor/main/app/view/FileMenuPanels.js | 7 +++++-- apps/spreadsheeteditor/main/app/view/FileMenuPanels.js | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 13e08e864..d37841fab 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -631,15 +631,18 @@ define([ }, autoCorrect: function() { + if (this.dlgAutoCorrect && this.dlgAutoCorrect.isVisible()) return; + if (!this._mathCorrect) this._mathCorrect = new Common.UI.DataViewStore(); if (!this._funcCorrect) this._funcCorrect = new Common.UI.DataViewStore(); - (new Common.Views.AutoCorrectDialog({ + this.dlgAutoCorrect = new Common.Views.AutoCorrectDialog({ mathStore: this._mathCorrect, functionsStore: this._funcCorrect, api: this.api - })).show(); + }); + this.dlgAutoCorrect.show(); }, strLiveComment: 'Turn on option', diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index 9e82ceb79..6b4d09073 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -543,15 +543,18 @@ define([ }, autoCorrect: function() { + if (this.dlgAutoCorrect && this.dlgAutoCorrect.isVisible()) return; + if (!this._mathCorrect) this._mathCorrect = new Common.UI.DataViewStore(); if (!this._funcCorrect) this._funcCorrect = new Common.UI.DataViewStore(); - (new Common.Views.AutoCorrectDialog({ + this.dlgAutoCorrect = new Common.Views.AutoCorrectDialog({ mathStore: this._mathCorrect, functionsStore: this._funcCorrect, api: this.api - })).show(); + }); + this.dlgAutoCorrect.show(); }, strInputMode: 'Turn on hieroglyphs', diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 2cdd37fb7..6660c975c 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -1443,15 +1443,18 @@ define([ }, autoCorrect: function() { + if (this.dlgAutoCorrect && this.dlgAutoCorrect.isVisible()) return; + if (!this._mathCorrect) this._mathCorrect = new Common.UI.DataViewStore(); if (!this._funcCorrect) this._funcCorrect = new Common.UI.DataViewStore(); - (new Common.Views.AutoCorrectDialog({ + this.dlgAutoCorrect = new Common.Views.AutoCorrectDialog({ mathStore: this._mathCorrect, functionsStore: this._funcCorrect, api: this.api - })).show(); + }); + this.dlgAutoCorrect.show(); }, strIgnoreWordsInUPPERCASE: 'Ignore words in UPPERCASE',