all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [PATCH yew-widget-toolkit] fix #8057: correctly scroll on firefox with submenus
Date: Mon, 21 Sep 2026 09:49:20 +0200	[thread overview]
Message-ID: <20260921074926.852370-1-d.csapak@proxmox.com> (raw)

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





                 reply	other threads:[~2026-09-21  7:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260921074926.852370-1-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=yew-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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