From 77a7f8a47985328184713e8dec6a2aa70da4e74c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 9 Apr 2020 18:35:36 +0300 Subject: [PATCH] Fix Bug 45106 --- apps/documenteditor/main/app/view/DocumentHolder.js | 5 +++++ apps/presentationeditor/main/app/view/DocumentHolder.js | 5 +++++ .../main/app/controller/DocumentHolder.js | 7 +++++++ 3 files changed, 17 insertions(+) diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js index 725c85b88..fe58a2d84 100644 --- a/apps/documenteditor/main/app/view/DocumentHolder.js +++ b/apps/documenteditor/main/app/view/DocumentHolder.js @@ -285,6 +285,11 @@ define([ event.preventDefault(); event.stopPropagation(); return false; + } else if (key === 48 || key === 96) {// 0 + me.api.zoom(100); + event.preventDefault(); + event.stopPropagation(); + return false; } } if (me.currentMenu && me.currentMenu.isVisible()) { diff --git a/apps/presentationeditor/main/app/view/DocumentHolder.js b/apps/presentationeditor/main/app/view/DocumentHolder.js index d9b490181..fae49f56f 100644 --- a/apps/presentationeditor/main/app/view/DocumentHolder.js +++ b/apps/presentationeditor/main/app/view/DocumentHolder.js @@ -288,6 +288,11 @@ define([ event.preventDefault(); event.stopPropagation(); return false; + } else if (key === 48 || key === 96) {// 0 + me.api.zoomFitToPage(); + event.preventDefault(); + event.stopPropagation(); + return false; } } if (me.currentMenu && me.currentMenu.isVisible()) { diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index df8d0e099..2700cee38 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -1499,6 +1499,13 @@ define([ this.api.asc_setZoom(factor); } + event.preventDefault(); + event.stopPropagation(); + return false; + } + } else if (key === 48 || key === 96) {// 0 + if (!this.api.isCellEdited) { + this.api.asc_setZoom(1); event.preventDefault(); event.stopPropagation(); return false;