Toolbar is not dynamic when scrolling through PDFs
Categories
(GeckoView :: PDF Viewer, defect)
Tracking
(firefox111 affected, firefox112 affected, firefox113 affected, firefox114 affected, firefox115 affected, firefox121 affected, firefox122 affected, firefox123 affected, firefox124 affected, firefox125 affected)
People
(Reporter: dpop, Unassigned)
References
Details
(Whiteboard: [PDF reader])
Attachments
(1 file)
503 bytes,
text/html
|
Details |
Steps to reproduce
- In about:config, set the pdfjs.disabled pref to false.
- Go to Settings > Customize and make sure that the "Scroll to hide toolbar" option from Gestures is enabled.
- Open a PDF file.
- Scroll down on the PDF and observe if the toolbar is dynamic.
Expected behavior
The toolbar should be dynamic when scrolling on the PDF file. This behavior would be consistent with normal tabs.
Actual behavior
The toolbar remains displayed at all times while scrolling on the PDF.
Device information
- Firefox version: Fenix Nightly 110.0a1 from 01/09
- Android device model: Google Pixel 6 , Xiaomi Pad5
- Android OS version: Android 13, Android 12
Any additional information?
Also reproducible on Focus Nightly 110.0a1 from 01/09.
Updated•2 years ago
|
Comment 1•2 years ago
|
||
I can reproduce this bug in either my Pixel 7 or in using a Pixel 6 in an emulator with:
https://mozilla.github.io/pdf.js/web/viewer.html
So it isn't because of the embedded pdf viewer but the viewer itself is doing something which prevents the toolbar to be hidden.
Comment 2•2 years ago
|
||
I managed to reproduce this issue with the following html:
<html dir="ltr">
<style>
#viewerContainer {
overflow: scroll;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
</style>
<body>
<div id="viewerContainer">
<div style="background: red; width: 100%; height: 1320px;"></div>
<div style="background: blue; width: 100%; height: 1320px;"></div>
<div style="background: yellow; width: 100%; height: 1320px;"></div>
<div style="background: pink; width: 100%; height: 1320px;"></div>
</div>
</body>
</html>
Updated•2 years ago
|
Comment 3•2 years ago
|
||
This bug is reproducible on Beta 111.0b3 with Samsung Galaxy Note 8 (Android 9).
Updated•2 years ago
|
Updated•2 years ago
|
Comment 4•1 years ago
|
||
Comment 5•1 years ago
|
||
(In reply to Calixte Denizet (:calixte) from comment #2)
I managed to reproduce this issue with the following html:
It's intentional that scrolling a subframe (a scrollable element that's not the page itself) doesn't hide the toolbar.
Is it necessary for the viewer to use a subframe in this way? Could it, for example, make the page itself scrollable and use position: fixed
or position: sticky
elements for toolbars and such?
Comment 6•1 year ago
|
||
ni?Calixte for comment 5
We'd like to figure out whether this can be fixed in pdf.js by altering the page structure, or if we need to change the platform behaviour to allow hiding the toolbar by scrolling a subframe.
Comment 7•1 year ago
|
||
It's likely possible to fix in pdf.js but it's very likely not that easy because we've to deal with some old code which has been written with some constraints which don't exist anymore. The code dealing with the UI is a bit under-tested so it should be very easy to break something.
That said, we should take the time to rewrite (and test) that stuff.
I'll try to have a look on that stuff asap.
Comment 8•1 year ago
|
||
I'm going to move this to the pdf.js component because it sounds like a solution in pdf.js will be explored.
I also filed bug 1861329 as an APZ bug to track potentially allowing subframe scrolling to trigger dynamic toolbar movement. This is a platform change we may want to make anyways, but it's a more involved change so it's probably better not to depend on that here.
Updated•10 months ago
|
Updated•6 months ago
|
Description
•