From e8da646a91a0439a63c7d0b9f5bd7c610dc3c52c Mon Sep 17 00:00:00 2001 From: spinline Date: Thu, 5 Feb 2026 20:55:14 +0300 Subject: [PATCH] fix(frontend): prevent callback panic by deferring menu close to on_close --- frontend/src/components/torrent/table.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/torrent/table.rs b/frontend/src/components/torrent/table.rs index 8e5033e..251ad03 100644 --- a/frontend/src/components/torrent/table.rs +++ b/frontend/src/components/torrent/table.rs @@ -181,7 +181,8 @@ pub fn TorrentTable() -> impl IntoView { let on_action = move |(action, hash): (String, String)| { logging::log!("TorrentTable Action: {} on {}", action, hash); - set_menu_visible.set(false); // Close menu immediately + // Note: Don't close menu here - ContextMenu's on_close handles it + // Closing here would dispose ContextMenu while still in callback chain // Get action messages for toast (Clean Code: DRY) let (success_msg, error_msg) = get_action_messages(&action);