diff --git a/frontend/src/components/context_menu.rs b/frontend/src/components/context_menu.rs index 36d8ee2..e70b563 100644 --- a/frontend/src/components/context_menu.rs +++ b/frontend/src/components/context_menu.rs @@ -63,24 +63,35 @@ pub fn TorrentContextMenu( { - let (x, y) = position.get(); - view! { -
-
vw { x - menu_width } else { x }; + let final_y = if y + menu_height > vh { y - menu_height } else { y }; + let final_x = final_x.max(0); + let final_y = final_y.max(0); + view! { +
+
// Start