[SSE] Fix bug 55581

This commit is contained in:
JuliaSvinareva 2022-02-17 20:37:31 +03:00
parent 52b9578299
commit f63ce8dc7f

View file

@ -106,6 +106,9 @@ define([
this.api.asc_drawPrintPreview(this._navigationPreview.currentPage); this.api.asc_drawPrintPreview(this._navigationPreview.currentPage);
} }
}, this)); }, this));
var eventname = (/Firefox/i.test(navigator.userAgent))? 'DOMMouseScroll' : 'mousewheel';
this.printSettings.$previewBox.on(eventname, _.bind(this.onPreviewWheel, this));
}, },
setApi: function(o) { setApi: function(o) {
@ -641,6 +644,11 @@ define([
this.updateNavigationButtons(index, this._navigationPreview.pageCount); 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) { onKeypressPageNumber: function (input, e) {
if (e.keyCode === Common.UI.Keys.RETURN) { if (e.keyCode === Common.UI.Keys.RETURN) {
var box = this.printSettings.$el.find('#print-number-page'), var box = this.printSettings.$el.find('#print-number-page'),