PDF Viewer: Ctrl + scroll wheel behavior is different to Ctrl + [+/-]

NEW
Unassigned

Status

()

Firefox
PDF Viewer
P3
normal
3 years ago
2 years ago

People

(Reporter: arni2033, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [pdfjs-c-ux], URL)

Attachments

(3 attachments)

(Reporter)

Description

3 years ago
Created attachment 8615542 [details]
PDF JS - Ctrl+Wheel[Up-Down] only maximizes-minimizes the scale.webm

Ctrl+[+/-] changes either pdf scale or page scale by ~10% (see bug 786674), but
Ctrl+Wheel[Up/Down] changes pdf scale to maximum/minimum

See attachment videos and bug 750658 that was somehow marked "WorksForMe"
(Reporter)

Comment 1

3 years ago
Created attachment 8615544 [details]
PDF JS - Ctrl+[+ -] works differently.webm

Reposting video of how Ctrl+[+/-] acts
I was unable to reproduce with my mice (microsoft and some really old one) and thinkpad's trackpads. 

Looks like it depends on some mouse (or firefox) setting. Can you check if you can reproduce the issue with new profile? Also, can you add a description of your mouse and its settings (if you changed any)?
Flags: needinfo?(arni2033)
(Reporter)

Comment 3

3 years ago
Created attachment 8622744 [details]
Mouse a4tech, Model OP-720, windows says the drivers are up-to-date.png

Of course it's reproducible on clear profile.
Mouse: a4tech, Model: OP-720

I also found out that if I set mouse options to "Scrolling the wheel is to scroll N lines", then Ctrl+ScrollWheelUp/Down in PDF viewer would act like "Ctrl+[+/-]" pressed N times. If N=1 then everything would work as expected.
But I always use mouse option "Scrolling the wheel is to scroll 1 screen". And it works as expected when scaling Up/Down the regular html-pages. But not with PDFs.
Flags: needinfo?(arni2033)
(Reporter)

Comment 4

3 years ago
So, I figured out what was causing this issue.
The code in PDFJS is supposed to press Ctrl+[±] N times, where N is -event.detail on 'DOMMouseScroll' event, but according to this link, when you choose "scroll by 1 page" on Windows, then event.detail is set to ±32768:
https://developer.mozilla.org/en-US/docs/Web/Events/DOMMouseScroll#detail

Issue I opened on github: https://github.com/mozilla/pdf.js/issues/6263
(Reporter)

Updated

3 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Updated

3 years ago
Has STR: --- → yes

Updated

3 years ago
Priority: -- → P3
Whiteboard: [pdfjs-c-ux]
(Reporter)

Updated

2 years ago
See Also: → bug 1251987
(Reporter)

Updated

2 years ago
See Also: → bug 1253484
(Reporter)

Updated

2 years ago
Blocks: 1257815
(Reporter)

Updated

2 years ago
See Also: bug 1251987
You need to log in before you can comment on or make changes to this bug.