Merge pull request #2537 from ONLYOFFICE/fix/bugfix

Fix Bug 63775, refactoring
This commit is contained in:
Julia Radzhabova
2023-08-23 22:38:41 +03:00
committed by GitHub
6 changed files with 10 additions and 5 deletions

View File

@ -65,7 +65,9 @@ define([
PAGEUP: 33,
PAGEDOWN: 34,
INSERT: 45,
ZERO: 48,
EQUALITY_FF:61,
NUM_ZERO: 96,
NUM_PLUS: 107,
NUM_MINUS: 109,
F1: 112,

View File

@ -31,7 +31,8 @@
';': 186, '\'': 222,
'[': 219, ']': 221, '\\': 220,
'ff-': 173, 'ff=': 61,
numplus: 107, numminus: 109
numplus: 107, numminus: 109,
'0': 48
},
code = function(x){
return _MAP[x] || x.toUpperCase().charCodeAt(0);

View File

@ -707,7 +707,7 @@ define([
event.preventDefault();
event.stopPropagation();
return false;
} else if (key === 48 || key === 96) {// 0
} else if (key === Common.UI.Keys.ZERO || key === Common.UI.Keys.NUM_ZERO) {// 0
me.api.zoom(100);
event.preventDefault();
event.stopPropagation();

View File

@ -718,7 +718,7 @@ define([
event.preventDefault();
event.stopPropagation();
return false;
} else if (key === 48 || key === 96) {// 0
} else if (key === Common.UI.Keys.ZERO || key === Common.UI.Keys.NUM_ZERO) {// 0
me.api.zoomFitToPage();
event.preventDefault();
event.stopPropagation();

View File

@ -2390,7 +2390,7 @@ define([
event.stopPropagation();
return false;
}
} else if (key === 48 || key === 96) {// 0
} else if (key === Common.UI.Keys.ZERO || key === Common.UI.Keys.NUM_ZERO) {// 0
if (!this.api.isCellEdited) {
this.api.asc_setZoom(1);
event.preventDefault();

View File

@ -2100,7 +2100,9 @@ define([
return false;
}
};
shortcuts['command+shift+=,ctrl+shift+=,command+shift+numplus,ctrl+shift+numplus' + (Common.Utils.isGecko ? ',command+shift+ff=,ctrl+shift+ff=' : '')] = function(e) {
shortcuts['command+shift+=,ctrl+shift+=,command+shift+numplus,ctrl+shift+numplus' + (Common.Utils.isGecko ? ',command+shift+ff=,ctrl+shift+ff=' : '') +
(Common.Utils.isMac ? ',command+shift+0,ctrl+shift+0' : '')] = function(e) {
if (Common.Utils.isMac && e.keyCode === Common.UI.Keys.ZERO && e.key!=='=') return false;
if (me.editMode && !me.toolbar.mode.isEditMailMerge && !me.toolbar.mode.isEditDiagram && !me.toolbar.mode.isEditOle && !me.toolbar.btnAddCell.isDisabled()) {
var cellinfo = me.api.asc_getCellInfo(),
selectionType = cellinfo.asc_getSelectionType();