fix: stop modal stacking

This commit is contained in:
Evan Carroll 2026-01-21 00:31:40 -06:00
parent ed1a1f10f9
commit 8c2e5d4f61

View file

@ -813,6 +813,20 @@ pub fn RealmPage() -> impl IntoView {
} }
} }
// If any modal is open, skip hotkeys (modals handle their own Escape key)
if settings_open.get_untracked()
|| inventory_open.get_untracked()
|| log_open.get_untracked()
|| keybindings_open.get_untracked()
|| avatar_editor_open.get_untracked()
|| register_modal_open.get_untracked()
|| history_modal_open.get_untracked()
|| conversation_modal_open.get_untracked()
{
*e_pressed_clone.borrow_mut() = false;
return;
}
// Handle space to focus chat input (no prefix) // Handle space to focus chat input (no prefix)
if key == " " { if key == " " {
set_focus_prefix.set(' '); set_focus_prefix.set(' ');