-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
- Framework7 version: 8.3.4
- Platform and Target: Windows
- Live Link or CodeSandbox: None
Describe the bug
When using the app.toolbar.hide() method to dynamically hide a fixed bottom Tabbar with the tabbar-icons class (e.g., called during route navigation), the .page-content element retains its padding-bottom controlled by the CSS custom property --f7-page-toolbar-bottom-offset. Even after the Tabbar is hidden, this padding-bottom does not automatically update to 0, causing an unwanted blank area at the bottom of the page content.
To Reproduce
- Create a new project using the Framework7 CLI (e.g., Tab View template).
- Ensure the Tabbar includes the
tabbar-iconsclass. - After navigating to a route (e.g., in a route's
pageAfterInhook), callapp.toolbar.hide('.toolbar.toolbar-bottom')to hide the Tabbar. - Observe the page loaded after the route navigation.
- Check the
.page-contentelement of the page; itspadding-bottomis still determined by--f7-page-toolbar-bottom-offset(a non-zero value).
Expected behavior
When app.toolbar.hide() is called and successfully hides the Tabbar with tabbar-icons, Framework7 should automatically update the --f7-page-toolbar-bottom-offset CSS variable to 0px, thereby causing the padding-bottom of .page-content to also become 0px, eliminating the bottom space. Conversely, when app.toolbar.show() is called, --f7-page-toolbar-bottom-offset should revert to the Tabbar's height.
Actual Behavior
The app.toolbar.hide() and app.toolbar.show() methods only handle toggling the Tabbar element's visibility via CSS classes (like toolbar-hidden) and trigger toolbar:hide / toolbar:show DOM events and toolbarHide / toolbarShow application events. They fail to automatically update the layout-related CSS variable --f7-page-toolbar-bottom-offset for .page-content. Consequently, the padding-bottom of .page-content remains unchanged, becoming inconsistent with the Tabbar's actual visibility state.
Screenshots
Additional context
- Known workaround: Manually set the
padding-bottomof the.page-contentelement to0after hiding the Tabbar (e.g., within the route'spageAfterInhook or by listening to thetoolbar:hideevent).