[DE PE SSE] Make new search: hide search window when open search panel

This commit is contained in:
JuliaSvinareva 2022-03-09 17:40:50 +03:00
parent e77f9db33d
commit ec831ded6a
3 changed files with 17 additions and 1 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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);