diff --git a/src-tauri/src/scripts/chat.js b/src-tauri/src/scripts/chat.js index 3ed89cb..f3f6d1a 100644 --- a/src-tauri/src/scripts/chat.js +++ b/src-tauri/src/scripts/chat.js @@ -9,6 +9,9 @@ async function init() { childList: true, subtree: true, }); + document.addEventListener('visibilitychange', () => + document.getElementsByTagName('textarea')[0]?.focus() + ); } function chatBtns() { @@ -92,6 +95,11 @@ function copyToClipboard(text, btn) { }, 1000); } +function focusOnInput() { + // This currently works because there is only a single `