Phone: the bottom navigation bar is too tall when a page opens, and takes its normal height only after scrolling #338
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#338
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reported from a phone, with Firefox. Not reproduced here: no desktop browser has a toolbar that hides on scrolling, so the causes below are read from the code and none is confirmed.
What happens
Below 768 pixels the main navigation is a bar fixed to the foot of the window (#299). When a page opens, the bar is taller than it should be. After scrolling through the page it has its normal height, and keeps it.
What the code does
assets/css/app.css, the@media (width < 48rem)block for.nav-main):fixed inset-x-0 bottom-0, a slot of at leastmin-h-12whose label may wrap, andpadding-bottom: max(0.25rem, env(safe-area-inset-bottom)). That padding is the only part of its height the browser decides.src/postulo/templates/base.html:5) iswidth=device-width, initial-scale=1, with noviewport-fit.--bottom-bar-heightbymeasureHeader()insrc/postulo/static/js/app.js, on load, on resize, when the fonts are ready and through aResizeObserver. The page's bottom padding,scroll-padding-bottomand the failure alert read it, so a bar that is too tall also leaves too much room under the page's last line.data-scrolledon the header, which adds a shadow (markScrolled()). Nothing the bar is sized by. So what changes the bar when the page scrolls is the browser.Likely causes, none confirmed
flex-wrap; if the window's width is reported narrower for the first layout, the last slot wraps under the others.To find out
On the phone, through Firefox's remote debugging (
about:debugging):padding-bottomand height of.nav-mainwhen the page opens and after scrolling;Fix
It depends on what is found. For the first cause: the inset should not count while the browser's own toolbar is under the bar, for example by applying it only where the page is drawn edge to edge. The measurement comes first.
Done when
tests/e2e/test_navigation_bar.pycannot hide a browser's toolbar, so the check is made by hand on a phone and what was measured is written here.Related: #299, which made the bar, and #339.
Reported on 2026-10-01, from a phone.