MuckRock / documentcloud-frontend

DocumentCloud's front end source code - Please report bugs, issues and feature requests to info@documentcloud.org
https://www.documentcloud.org
GNU Affero General Public License v3.0
15 stars 5 forks source link

Improve scrolling behavior in Mobile Safari #729

Open allanlasser opened 1 week ago

allanlasser commented 1 week ago

When scrolling a document in Mobile Safari ≥15.0, the bottom toolbar will remain in its "expanded" state.

This happens because our layouts rely on overflow-y: auto within an app container that fixed to 100% of the viewport's height. Because the document never overflows the viewport, Safari will not pick up on scrolling as a signal to collapse its toolbar.

Now, users can manually collapse the toolbar by tapping the "Options" in the address bar, and then selecting "Hide Toolbar" from the menu.

In order to gain a taller viewport, we can consider refactoring our layouts—particularly AppLayout, SidebarLayout, ContentLayout, and DocumentLayout—to avoid handling overflow and let the document assume the full height of the content. This would require a deep rethink of how we measure and position "sticky" elements like toolbars and navigation.