Scrolling is not working on pdfs inside presentation mode
Categories
(Firefox :: PDF Viewer, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr91 | --- | unaffected |
firefox-esr102 | --- | unaffected |
firefox104 | --- | wontfix |
firefox105 | --- | verified |
firefox106 | --- | verified |
People
(Reporter: cgeorgiu, Assigned: Snuffleupagus)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files, 1 obsolete file)
44 bytes,
text/x-github-pull-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
Found in
- Beta 105.0b3
Affected versions
- Release 104.0
- Beta 105.0b3
- Nightly 106.0a1
Tested platforms
- Affected platforms: Windows 10 x64, macOS 11
- Unaffected platforms: Ubuntu 20.04 x64
Steps to reproduce
- Launch Firefox.
- Navigate to http://www.pdf995.com/samples/pdf.pdf.
- Enter into presentation mode, and start scrolling via space bar, page up/down or home/end keys from the keyboard.
Expected result
- The scrolling is working in every case.
Actual result
- The scrolling is not working at all.
Regression range
- This seems to be a regression as I cannot reproduce the problem on Release 103.0. I'll investigate further in order to find a regression range.
Assignee | ||
Comment 1•2 years ago
|
||
mozregression gives the following pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=5da16396fa22b03b190b7d87f597ab11fa810b1d&tochange=cfcf61dedb350b96952a742d0466de479c17aa4e
Setting dom.fullscreen.modal = false
in about:config also "fixes" things, which thus confirms the regressing bug found above.
Note that the PDF Viewer uses "keydown" events to handle page-switching in Fullscreen-mode, and it appears that those events are no longer being dispatched after bug 1771150.
:emilio, can you please help out here?
Comment 2•2 years ago
|
||
Set release status flags based on info from the regressing bug 1771150
Comment 3•2 years ago
|
||
When entering in fullscreen mode in using the button, this one is "stealing" the focus, hence a way to fix this issue is to add an evt.preventDefault()
:
https://github.com/mozilla/pdf.js/blob/76f665d57fab7da08445a56c1b36fd746887ee75/web/toolbar.js#L158
but in a mousedown
listener.
Assignee | ||
Comment 4•2 years ago
|
||
(In reply to Calixte Denizet (:calixte) from comment #3)
When entering in fullscreen mode in using the button, this one is "stealing" the focus, hence a way to fix this issue is to add an
evt.preventDefault()
:
https://github.com/mozilla/pdf.js/blob/76f665d57fab7da08445a56c1b36fd746887ee75/web/toolbar.js#L158
but in amousedown
listener.
If in the end we need to work-around this on the PDF.js side of things, which isn't entirely clear to me (hopefully Emilio can chime in here), then a much smaller/simpler way to fix this would probably be to have the PresentationMode-code invoke this method instead.
Comment 5•2 years ago
|
||
Comment 6•2 years ago
•
|
||
Yeah, so this is technically bug 1740989 (we should blur the element when it becomes non-focusable). I took a quick look and it seems https://github.com/whatwg/html/issues/8225 would be great to get sorted out at least before implementing that.
The workaround being trivial seems worth landing / uplifting for now tho. Can anyone test Safari? My understanding is that they don't implement this either and should behave the same way we do...
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 7•2 years ago
|
||
Backport of upstream commit:
https://github.com/mozilla/pdf.js/pull/15355
Comment hidden (obsolete) |
Updated•2 years ago
|
Comment 10•2 years ago
|
||
The patch landed in nightly and beta is affected.
:Snuffleupagus, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox105
towontfix
.
For more information, please visit auto_nag documentation.
Comment 11•2 years ago
|
||
A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)
Assignee | ||
Comment 12•2 years ago
|
||
Comment on attachment 9292765 [details]
Bug 1787456 - Always focus the viewerContainer
when entering PresentationMode. r?#release-managers!
Beta/Release Uplift Approval Request
- User impact if declined: Keyboard scrolling is broken in PresentationMode in the PDF Viewer.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: Please see https://bugzilla.mozilla.org/show_bug.cgi?id=1787456#c0
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): It's a single line of added JS-code, inside of a try-catch block. The function being called is also used elsewhere in the PDF Viewer and has existed for many years.
- String changes made/needed: N/A
- Is Android affected?: No
Assignee | ||
Updated•2 years ago
|
Comment 13•2 years ago
|
||
Comment on attachment 9292765 [details]
Bug 1787456 - Always focus the viewerContainer
when entering PresentationMode. r?#release-managers!
Approved for 105.0b7.
Comment 14•2 years ago
|
||
bugherder uplift |
Updated•2 years ago
|
Comment 15•2 years ago
|
||
Verified as fixed in Beta 105.0b7 and our latest Nightly build 106.0a1 (2022-09-04) on both platforms.
Updated•2 years ago
|
Description
•