Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce the amount scaled when using mouse-wheel zooming in Chromium-b…
…rowsers (issue 16325) So I have found that rather than messing with the delta values, the simplest way to solve the problem would be to find a clean way to detect if the browser was Chromium or not. I found that chromium browsers have a property called windows.chrome which on console logging, looks something like this: { app: { isInstalled: false, InstallState: { DISABLED: disabled, INSTALLED: installed, NOT_INSTALLED: not_installed }, RunningState: { CANNOT_RUN: cannot_run, READY_TO_RUN: ready_to_run, RUNNING: running } }, appPinningPrivate: {} } Whereas in firefox, logging that property returns undefined. I had searched to see if there were ways that the window.chrome property could be faked (since the navigator.userAgent could be faked) but I couldnt find anything regarding that. Whats more, Edge, Opera, Brave and Chrome all support this property as per https://stackoverflow.com/a/13348618 So the current fix just adds the windows.chrome check to the if condition at line 2762. I had tested this functionality myself on all these browsers and they work as intended in both desktop and mobile versions. Update: Added PDFJSDev checks to ensure no unnecessary code ends up in the built-in Firefox PDF Viewer
- Loading branch information