From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 64AFB1FF09C for ; Mon, 21 Sep 2026 09:49:33 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 2B5ED2144E; Mon, 21 Sep 2026 09:49:33 +0200 (CEST) From: Dominik Csapak 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 Message-ID: <20260921074926.852370-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.461 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 2SPNUJFEVLGQJLS6N3V6KQPPPUCVEZOI X-Message-ID-Hash: 2SPNUJFEVLGQJLS6N3V6KQPPPUCVEZOI X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Yew framework devel list at Proxmox List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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