Fix Bug 35853.

This commit is contained in:
Julia Radzhabova 2017-09-19 17:26:09 +03:00
parent 876171af9c
commit 28661417e8
4 changed files with 8 additions and 6 deletions

View file

@ -66,6 +66,7 @@ define([
PAGEUP: 33, PAGEUP: 33,
PAGEDOWN: 34, PAGEDOWN: 34,
INSERT: 45, INSERT: 45,
EQUALITY_FF:61,
NUM_PLUS: 107, NUM_PLUS: 107,
NUM_MINUS: 109, NUM_MINUS: 109,
F1: 112, F1: 112,
@ -80,6 +81,7 @@ define([
F10: 121, F10: 121,
F11: 122, F11: 122,
F12: 123, F12: 123,
MINUS_FF: 173,
EQUALITY: 187, EQUALITY: 187,
MINUS: 189 MINUS: 189
}, },

View file

@ -267,13 +267,13 @@ define([
if (me.api){ if (me.api){
var key = event.keyCode; var key = event.keyCode;
if ((event.ctrlKey || event.metaKey) && !event.shiftKey && !event.altKey){ if ((event.ctrlKey || event.metaKey) && !event.shiftKey && !event.altKey){
if (key === Common.UI.Keys.NUM_PLUS || key === Common.UI.Keys.EQUALITY || (Common.Utils.isOpera && key == 43)){ if (key === Common.UI.Keys.NUM_PLUS || key === Common.UI.Keys.EQUALITY || (Common.Utils.isGecko && key === Common.UI.Keys.EQUALITY_FF) || (Common.Utils.isOpera && key == 43)){
me.api.zoomIn(); me.api.zoomIn();
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
return false; return false;
} }
else if (key === Common.UI.Keys.NUM_MINUS || key === Common.UI.Keys.MINUS || (Common.Utils.isOpera && key == 45)){ else if (key === Common.UI.Keys.NUM_MINUS || key === Common.UI.Keys.MINUS || (Common.Utils.isGecko && key === Common.UI.Keys.MINUS_FF) || (Common.Utils.isOpera && key == 45)){
me.api.zoomOut(); me.api.zoomOut();
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();

View file

@ -273,13 +273,13 @@ define([
if (me.api){ if (me.api){
var key = event.keyCode; var key = event.keyCode;
if ((event.ctrlKey || event.metaKey) && !event.shiftKey && !event.altKey){ if ((event.ctrlKey || event.metaKey) && !event.shiftKey && !event.altKey){
if (key === Common.UI.Keys.NUM_PLUS || key === Common.UI.Keys.EQUALITY || (Common.Utils.isOpera && key == 43)){ if (key === Common.UI.Keys.NUM_PLUS || key === Common.UI.Keys.EQUALITY || (Common.Utils.isGecko && key === Common.UI.Keys.EQUALITY_FF) || (Common.Utils.isOpera && key == 43)){
me.api.zoomIn(); me.api.zoomIn();
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
return false; return false;
} }
else if (key === Common.UI.Keys.NUM_MINUS || key === Common.UI.Keys.MINUS || (Common.Utils.isOpera && key == 45)){ else if (key === Common.UI.Keys.NUM_MINUS || key === Common.UI.Keys.MINUS || (Common.Utils.isGecko && key === Common.UI.Keys.MINUS_FF) || (Common.Utils.isOpera && key == 45)){
me.api.zoomOut(); me.api.zoomOut();
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();

View file

@ -1176,7 +1176,7 @@ define([
if (this.api){ if (this.api){
var key = event.keyCode; var key = event.keyCode;
if ((event.ctrlKey || event.metaKey) && !event.shiftKey && !event.altKey){ if ((event.ctrlKey || event.metaKey) && !event.shiftKey && !event.altKey){
if (key === Common.UI.Keys.NUM_PLUS || key === Common.UI.Keys.EQUALITY || (Common.Utils.isOpera && key == 43)){ if (key === Common.UI.Keys.NUM_PLUS || key === Common.UI.Keys.EQUALITY || (Common.Utils.isGecko && key === Common.UI.Keys.EQUALITY_FF) || (Common.Utils.isOpera && key == 43)){
if (!this.api.isCellEdited) { if (!this.api.isCellEdited) {
var factor = Math.floor(this.api.asc_getZoom() * 10)/10; var factor = Math.floor(this.api.asc_getZoom() * 10)/10;
factor += .1; factor += .1;
@ -1188,7 +1188,7 @@ define([
event.stopPropagation(); event.stopPropagation();
return false; return false;
} }
} else if (key === Common.UI.Keys.NUM_MINUS || key === Common.UI.Keys.MINUS || (Common.Utils.isOpera && key == 45)){ } else if (key === Common.UI.Keys.NUM_MINUS || key === Common.UI.Keys.MINUS || (Common.Utils.isGecko && key === Common.UI.Keys.MINUS_FF) || (Common.Utils.isOpera && key == 45)){
if (!this.api.isCellEdited) { if (!this.api.isCellEdited) {
factor = Math.ceil(this.api.asc_getZoom() * 10)/10; factor = Math.ceil(this.api.asc_getZoom() * 10)/10;
factor -= .1; factor -= .1;