diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index c9020ccd8f..5f30ed3e74 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -957,6 +957,11 @@ define([ }, onShowAfterSearch: function (findText) { + var viewport = this.getApplication().getController('Viewport'); + if (viewport.isSearchBarVisible()) { + viewport.searchBar.hide(); + } + var text = findText || this.api.asc_GetSelectedText(); if (text) { this.leftMenu.panelSearch.setFindText(text); diff --git a/apps/presentationeditor/main/app/controller/LeftMenu.js b/apps/presentationeditor/main/app/controller/LeftMenu.js index 8d95869a11..a2538ec14b 100644 --- a/apps/presentationeditor/main/app/controller/LeftMenu.js +++ b/apps/presentationeditor/main/app/controller/LeftMenu.js @@ -812,6 +812,11 @@ define([ }, onShowAfterSearch: function (findText) { + var viewport = this.getApplication().getController('Viewport'); + if (viewport.isSearchBarVisible()) { + viewport.searchBar.hide(); + } + var text = findText || this.api.asc_GetSelectedText(); if (text) { this.leftMenu.panelSearch.setFindText(text); diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index 84be46512c..a9a17a4795 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -66,7 +66,8 @@ define([ 'file:show': _.bind(this.fileShowHide, this, true), 'file:hide': _.bind(this.fileShowHide, this, false), 'comments:show': _.bind(this.commentsShowHide, this, true), - 'comments:hide': _.bind(this.commentsShowHide, this, false) + 'comments:hide': _.bind(this.commentsShowHide, this, false), + 'search:aftershow': _.bind(this.onShowAfterSearch, this) }, 'Common.Views.About': { 'show': _.bind(this.aboutShowHide, this, true), @@ -1019,6 +1020,11 @@ define([ }, onShowAfterSearch: function (findText) { + var viewport = this.getApplication().getController('Viewport'); + if (viewport.isSearchBarVisible()) { + viewport.searchBar.hide(); + } + var text = findText || this.api.asc_GetSelectedText(); if (text) { this.leftMenu.panelSearch.setFindText(text);