From 1662a8af8261ff7b65d16f2fde5b503d2f71dc33 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Thu, 8 May 2025 11:37:30 +0200 Subject: [PATCH] Hide terminal menu when pressing ESC This was only working when the focus was on the input --- app/views/commands/_terminal.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/commands/_terminal.html.erb b/app/views/commands/_terminal.html.erb index 62bd7ecbf..6efee7eff 100644 --- a/app/views/commands/_terminal.html.erb +++ b/app/views/commands/_terminal.html.erb @@ -4,7 +4,7 @@ terminal_confirmation_class: "terminal--confirmation", terminal_help_class: "terminal--showing-help", toggle_class_toggle_class: "terminal--open", - action: "keydown->terminal#handleKeyPress keydown->navigable-list#navigate focusin->navigable-list#select keydown.esc->toggle-class#remove:stop keydown.esc->terminal#focus keydown.esc->navigable-list#selectLast" } do %> + action: "keydown->terminal#handleKeyPress keydown->navigable-list#navigate focusin->navigable-list#select keydown.esc->toggle-class#remove:stop keydown.esc->terminal#focus keydown.esc->navigable-list#selectLast keydown.esc@document->terminal#hideHelpMenu" } do %> <%= turbo_frame_tag :recent_commands, src: commands_path, refresh: "morph" %> <%= render "commands/form" %>