From fdef0e4efa0d6499d18721150b0fbd695dc9c556 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sun, 27 Aug 2023 16:45:37 -0700 Subject: [PATCH] Focus on chat input field after Ctrl+S --- js/main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/main.js b/js/main.js index bccdd346..bba3106a 100644 --- a/js/main.js +++ b/js/main.js @@ -60,6 +60,9 @@ document.addEventListener("keydown", function(event) { var showControlsElement = document.getElementById('show-controls'); if (showControlsElement && showControlsElement.childNodes.length >= 4) { showControlsElement.childNodes[3].click(); + + var arr = document.getElementById('chat-input').childNodes[2].childNodes; + arr[arr.length - 1].focus(); } }