From f63ce8dc7f547d9259f0ad896133c4eb3a02d04b Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Thu, 17 Feb 2022 20:37:31 +0300 Subject: [PATCH] [SSE] Fix bug 55581 --- apps/spreadsheeteditor/main/app/controller/Print.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js index 616f237c1..273fca42f 100644 --- a/apps/spreadsheeteditor/main/app/controller/Print.js +++ b/apps/spreadsheeteditor/main/app/controller/Print.js @@ -106,6 +106,9 @@ define([ this.api.asc_drawPrintPreview(this._navigationPreview.currentPage); } }, this)); + + var eventname = (/Firefox/i.test(navigator.userAgent))? 'DOMMouseScroll' : 'mousewheel'; + this.printSettings.$previewBox.on(eventname, _.bind(this.onPreviewWheel, this)); }, setApi: function(o) { @@ -641,6 +644,11 @@ define([ this.updateNavigationButtons(index, this._navigationPreview.pageCount); }, + onPreviewWheel: function (e) { + var forward = (e.deltaY || (e.detail && -e.detail) || e.wheelDelta) < 0; + this.onChangePreviewPage(forward); + }, + onKeypressPageNumber: function (input, e) { if (e.keyCode === Common.UI.Keys.RETURN) { var box = this.printSettings.$el.find('#print-number-page'),