Merge pull request #1580 from ONLYOFFICE/feature/sse-nav-print

[SSE] Fix bug 55581
This commit is contained in:
Julia Radzhabova 2022-02-18 11:49:44 +03:00 committed by GitHub
commit f8b74dc0ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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'),