Merge pull request #1771 from ONLYOFFICE/fix/fix-bugs

Fix/fix bugs
This commit is contained in:
Julia Radzhabova 2022-05-31 20:47:10 +03:00 committed by GitHub
commit 03cdfcfe56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View file

@ -134,7 +134,7 @@ Common.UI.HintManager = new(function() {
return;
}
if (_isEditDiagram) {
_currentSection = [$(window.parent.document).find('.advanced-settings-dlg')[0], window.document];
_currentSection = [$(window.parent.document).find('.advanced-settings-dlg:visible')[0], window.document];
} else if ($('#file-menu-panel').is(':visible')) {
_currentSection = $('#file-menu-panel');
} else {

View file

@ -742,11 +742,6 @@ define([
btnSearch.pressed && btnSearch.toggle(false);
this.leftMenu._state.isSearchOpen && (this.leftMenu._state.isSearchOpen = false);
if (this.mode.isEditMailMerge || this.mode.isEditOle) {
btnSearch = this.getApplication().getController('Toolbar').toolbar.btnSearch;
btnSearch.pressed && btnSearch.toggle(false);
}
if ( this.leftMenu.menuFile.isVisible() ) {
if (Common.UI.HintManager.needCloseFileMenu())
this.leftMenu.menuFile.hide();
@ -775,11 +770,14 @@ define([
return false;
}
if (this.mode.isEditDiagram || this.mode.isEditMailMerge || this.mode.isEditOle) {
var searchBarBtn = (this.mode.isEditMailMerge || this.mode.isEditOle) && this.getApplication().getController('Toolbar').toolbar.btnSearch,
isSearchOpen = searchBarBtn && searchBarBtn.pressed;
menu_opened = $(document.body).find('.open > .dropdown-menu');
if (!this.api.isCellEdited && !menu_opened.length) {
if (!this.api.isCellEdited && !menu_opened.length && !isSearchOpen) {
Common.Gateway.internalMessage('shortcut', {key:'escape'});
return false;
}
isSearchOpen && searchBarBtn.toggle(false);
}
break;
/** coauthoring begin **/