Merge pull request 'fix/bugfix' (#105) from fix/bugfix into hotfix/v8.2.1

This commit is contained in:
Julia Radzhabova
2024-10-29 21:47:54 +00:00
4 changed files with 19 additions and 10 deletions

View File

@ -274,7 +274,7 @@ define([
this.onResetItems();
},
openMenu: function(delay) {
openMenu: function(delay, callback) {
if (this.store.length<1) return;
var me = this;
@ -291,6 +291,7 @@ define([
_.delay(function(){
me.cmpEl.addClass('open');
callback && callback();
}, delay || 0);
},
@ -442,10 +443,12 @@ define([
},
onAfterKeydownMenu: function(e) {
var me = this;
if (e.keyCode == Common.UI.Keys.DOWN && !this.editable && !this.isMenuOpen()) {
this.onBeforeShowMenu();
this.openMenu();
this.onAfterShowMenu();
this.openMenu(0, function() {
me.onAfterShowMenu();
});
return false;
} else if (!this.focusWhenNoSelection && (e.keyCode == Common.UI.Keys.DOWN || e.keyCode == Common.UI.Keys.UP)) {
var $items = this.cmpEl.find('ul > li a');
@ -471,7 +474,6 @@ define([
} else if (this.search && e.keyCode > 64 && e.keyCode < 91 && e.key){
if (typeof this._search !== 'object') return;
var me = this;
clearTimeout(this._search.timer);
this._search.timer = setTimeout(function () { me._search = {}; }, 1000);
@ -548,8 +550,9 @@ define([
this.onAfterHideMenu(e);
} else if (e.keyCode == Common.UI.Keys.UP || e.keyCode == Common.UI.Keys.DOWN) {
if (!this.isMenuOpen()) {
this.openMenu();
this.onAfterShowMenu();
this.openMenu(0, function() {
me.onAfterShowMenu();
});
}
_.delay(function() {

View File

@ -60,7 +60,8 @@ Common.UI.ScreenReaderFocusManager = new(function() {
_isEditDiagram = false,
_isSidePanelMode = false,
_api,
_app;
_app,
_appPrefix;
var _setCurrentSection = function (btn, section) {
_lastSection = _currentSection;
@ -268,6 +269,9 @@ Common.UI.ScreenReaderFocusManager = new(function() {
_app = window.DE || window.PE || window.SSE || window.PDFE;
_isDocReady = true;
var filter = Common.localStorage.getKeysFilter();
_appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
if ( !Common.Utils.ScreeenReaderHelper ) {
require(['common/main/lib/util/ScreenReaderHelper'], function () {
Common.Utils.ScreeenReaderHelper.setEnabled(true);
@ -399,7 +403,8 @@ Common.UI.ScreenReaderFocusManager = new(function() {
}
});
$(document).on('keydown', function(e) {
_needShow = e.keyCode == Common.UI.Keys.ALT && !e.shiftKey && !Common.Utils.ModalWindow.isVisible() && _isDocReady && !(window.PE && $('#pe-preview').is(':visible'));
_needShow = Common.Utils.InternalSettings.get(_appPrefix + "settings-show-alt-hints") && e.keyCode == Common.UI.Keys.ALT && !e.shiftKey &&
!Common.Utils.ModalWindow.isVisible() && _isDocReady && !(window.PE && $('#pe-preview').is(':visible'));
// Add outline style for focus elements for test
if (Common.localStorage.getBool('screen-reader-focus-mode', false)) {

View File

@ -2901,11 +2901,12 @@ define([
documentHolder.pmiFilterCells.setVisible(iscellmenu && !iscelledit && !diagramOrMergeEditor && !inPivot);
documentHolder.pmiReapply.setVisible((iscellmenu||isallmenu) && !iscelledit && !diagramOrMergeEditor && !inPivot);
documentHolder.pmiCondFormat.setVisible(!iscelledit && !diagramOrMergeEditor);
documentHolder.pmiCellSeparator.setVisible((iscellmenu||isallmenu||isinsparkline) && !iscelledit);
documentHolder.pmiInsFunction.setVisible(iscellmenu && !iscelledit && !inPivot);
documentHolder.pmiAddNamedRange.setVisible(iscellmenu && !iscelledit && !internaleditor);
var needshow = iscellmenu && !iscelledit && !diagramOrMergeEditor && inPivot;
documentHolder.pmiCellSeparator.setVisible((iscellmenu||isallmenu||isinsparkline) && !iscelledit && !inPivot || needshow);
needshow && this.fillPivotProps();
documentHolder.mnuRefreshPivot.setVisible(needshow);

View File

@ -451,7 +451,7 @@ define([], function () {
this.cmbUser.setRawValue(str);
if (arr.length>0)
this.cmbUser.openMenu()
this.cmbUser.openMenu();
else {
this.cmbUser.closeMenu();
this.cmbUser.focus();