all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH yew-widget-toolkit] fix #8057: correctly scroll on firefox with submenus
@ 2026-09-21  7:49 Dominik Csapak
  0 siblings, 0 replies; only message in thread
From: Dominik Csapak @ 2026-09-21  7:49 UTC (permalink / raw)
  To: yew-devel

There is a subtle difference in calculating the height of nested
grid containers: chrome uses the min-content height while firefox does
not. This means, on firefox, the navigation drawer would not have it's
intended size + scrollbars, but would clip the submenus since they would
shrink.

Fix this by giving the whole menu a container that can grow, and only
scroll the outer container.

This fixes an issue on PDM, where a bigger number of remotes would not
allow the users to scroll, but clip the list.

Fixes: f5bfd42 (widget: navigation drawer: make menu collapsing/expanding animated)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/widget/nav/navigation_drawer.rs | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/widget/nav/navigation_drawer.rs b/src/widget/nav/navigation_drawer.rs
index 87f0743..8b99cc9 100644
--- a/src/widget/nav/navigation_drawer.rs
+++ b/src/widget/nav/navigation_drawer.rs
@@ -632,7 +632,7 @@ impl Component for PwtNavigationDrawer {
             event.prevent_default();
         });
 
-        let mut column = Column::new()
+        let menu = Column::new()
             .onkeydown(onkeydown)
             // avoid https://bugzilla.mozilla.org/show_bug.cgi?id=1069739
             .attribute("tabindex", "-1")
@@ -649,11 +649,15 @@ impl Component for PwtNavigationDrawer {
         let active = get_active_or_default(props, &self.active);
         let active = active.as_deref().unwrap_or("");
 
+        // inner container that can take the full height of the children,
+        // so the outer one can scroll
+        let mut column = Column::new();
         for item in props.menu.children.iter() {
             self.render_menu_entry(ctx, item, &mut column, active, 0, false);
         }
 
-        column.into_html_with_ref(self.node_ref.clone())
+        menu.with_child(column)
+            .into_html_with_ref(self.node_ref.clone())
     }
 }
 
-- 
2.47.3





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-21  7:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-21  7:49 [PATCH yew-widget-toolkit] fix #8057: correctly scroll on firefox with submenus Dominik Csapak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal