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 190B41FF129 for ; Fri, 16 Oct 2026 11:03:00 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id CB5552145C; Fri, 16 Oct 2026 11:02:59 +0200 (CEST) From: Dominik Csapak To: yew-devel@lists.proxmox.com Subject: [PATCH yew-widget-toolkit 4/5] widget: data table: header: fix keyboard navigation from group headers Date: Fri, 16 Oct 2026 11:01:13 +0200 Message-ID: <20261016090256.1170172-5-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261016090256.1170172-1-d.csapak@proxmox.com> References: <20261016090256.1170172-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.361 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: UCPFGNXBC6RJZLXSVS7MEVI57HKKKNTT X-Message-ID-Hash: UCPFGNXBC6RJZLXSVS7MEVI57HKKKNTT 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: Only column headers update the header cursor when they get the focus, but group headers are focusable too. When a group header gets the focus, the cursor is either not set yet, so the arrow keys do nothing, or it still points to the previously focused cell, so the arrow keys move from there instead. Since the first header cell is the initial tab stop, this affects every table where the first header is a group header. To reproduce: * use a data table where the first header is a group header * focus the header with the tab key * press the right arrow key The focus stays on the group header instead of moving to the next cell. Fix this by also setting the cursor when a group header gets the focus. Signed-off-by: Dominik Csapak --- src/widget/data_table/header_widget.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/widget/data_table/header_widget.rs b/src/widget/data_table/header_widget.rs index b6f06f6..2f55e88 100644 --- a/src/widget/data_table/header_widget.rs +++ b/src/widget/data_table/header_widget.rs @@ -425,6 +425,7 @@ impl PwtHeaderWidget { format!("grid-column: {} / span {}", start_col + 1, span,), ) .with_child(group.name.clone()) + .onfocusin(link.callback(move |_| Msg::FocusCell(cell_idx))) .into(), ); -- 2.47.3