Skip to content

PDF viewer: mouse-wheel scrolling does not work on current Chromium (only legacy mousewheel/DOMMouseScroll are hooked) #83

Description

@Timba90

Summary

Mouse-wheel scrolling does not work in the PDF editor/viewer on current Chromium (tested with Edge 152.0.4191.53 and the matching WebView2 runtime). Dragging the scrollbar works; the wheel does nothing.

Cause

pdf/src/viewer.js (main @ d8a3d24, around line 1102) hooks only the legacy events:

_t.parent.onmousewheel = _t.onMouseWhell;
if (_t.parent.addEventListener)
    _t.parent.addEventListener("DOMMouseScroll", _t.onMouseWhell, false);

Chromium no longer dispatches the legacy mousewheel event, and DOMMouseScroll is Firefox-only. Measured with listeners on document during one wheel notch: {"mousewheel":0,"wheel":1,"wheelDelta":-120,"deltaY":600} — only wheel arrives, so onMouseWhell never runs.

The document editor is unaffected because it also registers a wheel listener elsewhere.

Fix that works

Register the same handler for wheel as well (the handler already reads the legacy wheelDelta* properties, which Chromium still populates on wheel events):

_t.parent.onmousewheel = _t.onMouseWhell;
_t.parent.addEventListener("wheel", _t.onMouseWhell, { passive: false });

With this patch applied to the built word/sdk-all.js, one wheel notch scrolls the PDF viewer by 45 px (same as the document editor), and the document editor still scrolls exactly once (no double registration there).

Environment

  • Euro-Office/sdkjs main @ d8a3d24 (2026-08-27), built with npm run build, served with Euro-Office/web-apps main @ b8eb618b
  • Chromium 152 (Edge and WebView2), Windows 11

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions