Yes, still happens in 11.10.0
The zoomToMouse API doc says “Adjusts the viewer’s zoom factor and positions the point on the document under the mouse at the same position after zooming in.” - that suggests I do not need to worry about any PDF/page coordinates as the method is supposed to handle that.
I have been referencing the previous discussion on this topic here: Can I zoom based on mousewheel only events, and not ctrl + mousewheel event? - #6 by Andrew_Yip
I am attaching the wheel event handler to documentViewer.getScrollViewElement()
To get the offsets, I get the bounding rect for the scroll element and then the zoomToMouse call becomes…
const svr = documentViewer.getScrollViewElement().getBoundingClientRect();
documentViewer.zoomToMouse(newZoomLevel, svr.left, svr.top, event);
However, it’s close, but it doesn’t work. Here’s a video:
You can see that the first two turns of the wheel result in jumps, as do the last two in the reverse direction.
This happens in latest Firefox & Safari on latest OSX Sequoia.
The .DocumentContainer has overflow:hidden applied.