From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id D885A1FF139 for ; Mon, 12 Jan 2026 14:09:52 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 01B6F1E91B; Mon, 12 Jan 2026 14:09:55 +0100 (CET) Mime-Version: 1.0 Date: Mon, 12 Jan 2026 14:09:51 +0100 Message-Id: From: "Lukas Wagner" To: "Yew framework devel list at Proxmox" , "Dominik Csapak" X-Mailer: aerc 0.21.0-0-g5549850facc2-dirty References: <20251202155805.110540-1-d.csapak@proxmox.com> In-Reply-To: <20251202155805.110540-1-d.csapak@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1768223348363 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.038 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [yew-devel] [PATCH yew-widget-toolkit] improve keyboard navigation with fields in data tables X-BeenThere: yew-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Yew framework devel list at Proxmox List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Yew framework devel list at Proxmox Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: yew-devel-bounces@lists.proxmox.com Sender: "yew-devel" On Tue Dec 2, 2025 at 4:57 PM CET, Dominik Csapak wrote: > when inside an input field in a data table, the intention was to focus > the next cell when pressing tab. This currently does not work correctly, > since 'cell_focus_next' tries to focus the next element next to the > already focused one, and that is not the cell itself but the field > inside. > > Instead of trying to fix that, simply let the browser handle the focus > handling. This has the advantage that in table with multiple fields > (like we have in the PDM node list for remotes) we directly focus the > next input field instead of the next cell (which would need another > press of 'tab' to focus the input field). > > The downside is that to focus the next cell (if it does not contain an > input), one has to "go out" of the field by pressing F2 and then > pressing tab. > > Since in a data table with fields it is often more useful to navigate > between those instead of the table cells, i opted for this solution. > > In addition, add a tabindex of '0' to the triggers, so they'll always be > able to be focused. > > Signed-off-by: Dominik Csapak > --- > src/widget/data_table/data_table.rs | 5 +---- > src/widget/trigger.rs | 2 +- > 2 files changed, 2 insertions(+), 5 deletions(-) > > diff --git a/src/widget/data_table/data_table.rs b/src/widget/data_table/data_table.rs > index 7805340..8a68e8c 100644 > --- a/src/widget/data_table/data_table.rs > +++ b/src/widget/data_table/data_table.rs > @@ -1220,10 +1220,7 @@ impl Component for PwtDataTable { > event.prevent_default(); > self.cell_focus_next(&record_key, true); > } > - "Tab" if inside_input => { > - event.prevent_default(); > - self.cell_focus_next(&record_key, !shift); > - } > + "Tab" if inside_input => {} > " " if !inside_input => { > // avoid scrollbar default action > event.prevent_default(); > diff --git a/src/widget/trigger.rs b/src/widget/trigger.rs > index be8d8fb..a5d19cf 100644 > --- a/src/widget/trigger.rs > +++ b/src/widget/trigger.rs > @@ -68,7 +68,7 @@ impl Component for PwtTrigger { > None, > ); > > - Tooltip::new(icon).tip(props.tip).into() > + Tooltip::new(icon).tabindex(0).tip(props.tip).into() > } > } > Seems to work as expected: Tested-by: Lukas Wagner _______________________________________________ yew-devel mailing list yew-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel