Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High value of WHEEL_ZOOM_DISABLED_TIMEOUT causes delay between scrolling and zooming #17707

Closed
bluewww opened this issue Feb 21, 2024 · 0 comments · Fixed by #17724
Closed

High value of WHEEL_ZOOM_DISABLED_TIMEOUT causes delay between scrolling and zooming #17707

bluewww opened this issue Feb 21, 2024 · 0 comments · Fixed by #17724

Comments

@bluewww
Copy link

bluewww commented Feb 21, 2024

Attach (recommended) or Link to PDF file here:
https://people.eecs.berkeley.edu/~krste/papers/riscv-privileged-v1.9.pdf

Configuration:

  • Web browser and its version: Mozilla Firefox 122.0.1 (64-bit)
  • Operating system and its version: AlmaLinux 8.8
  • PDF.js version: builtin into firefox
  • Is a browser extension: No

Steps to reproduce the problem:

  1. Scroll downwards
  2. While scrolling downwards, press ctrl to start zooming

What is the expected behavior?
Immediately zoom into the pdf.

What went wrong?
It takes exactly 2 seconds (measured to a few tenths of a second) before zooming starts. This makes the pdf.js feel unresponsive to user input.

The problem is the WHEEL_ZOOM_DISABLED_TIMEOUT value being set to 1000. For the zoom delay problem it seems to count double for some reason. Settings this value to something like 100 or lower vastly reduces the scroll-to-zoom delay.

calixteman added a commit to calixteman/pdf.js that referenced this issue Feb 24, 2024
Allow to zoom with the wheel once the scrolling is finished.
It's now possible to know that thanks to the scrollend event.
Keep the previous way to work for browsers not supporting the
scrollend event.

Fixes mozilla#17707.
calixteman added a commit to calixteman/pdf.js that referenced this issue Feb 25, 2024
Allow to zoom with the wheel once the scrolling is finished.
It's now possible to know that thanks to the scrollend event.

Fixes mozilla#17707.
calixteman added a commit to calixteman/pdf.js that referenced this issue Feb 25, 2024
Allow to zoom with the wheel once the scrolling is finished.
It's now possible to know that thanks to the scrollend event.

Fixes mozilla#17707.
calixteman added a commit to calixteman/pdf.js that referenced this issue Feb 25, 2024
Allow to zoom with the wheel once the scrolling is finished.
It's now possible to know that thanks to the scrollend event.

Fixes mozilla#17707.
calixteman added a commit to calixteman/pdf.js that referenced this issue Feb 25, 2024
Allow to zoom with the wheel once the scrolling is finished.
It's now possible to know that thanks to the scrollend event.

Fixes mozilla#17707.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant