Open Bug 1809173 Opened 2 years ago Updated 2 months ago

Toolbar is not dynamic when scrolling through PDFs

Categories

(GeckoView :: PDF Viewer, defect)

All
Android
defect

Tracking

(firefox111 affected, firefox112 affected, firefox113 affected, firefox114 affected, firefox115 affected, firefox121 affected, firefox122 affected, firefox123 affected, firefox124 affected, firefox125 affected)

Tracking Status
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)

Steps to reproduce

  1. In about:config, set the pdfjs.disabled pref to false.
  2. Go to Settings > Customize and make sure that the "Scroll to hide toolbar" option from Gestures is enabled.
  3. Open a PDF file.
  4. 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.

Whiteboard: [PDF Reader] → [PDF reader]
Blocks: 1803753

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.

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>

This bug is reproducible on Beta 111.0b3 with Samsung Galaxy Note 8 (Android 9).

Component: General → Toolbar
See Also: → 1836299

(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?

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.

Flags: needinfo?(cdenizet)

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.

Flags: needinfo?(cdenizet)
See Also: → 1861329

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.

Component: Toolbar → PDF Viewer
Product: Fenix → Firefox
Product: Firefox → GeckoView
Version: Firefox 110 → unspecified
See Also: → 1893318
See Also: → 1908639
Duplicate of this bug: 1879406
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: