From 782e9e5fa0b3be376f7ea31e8cce842acf52f0cd Mon Sep 17 00:00:00 2001 From: ebolam Date: Wed, 26 Apr 2023 19:55:15 -0400 Subject: [PATCH] Another fix --- static/koboldai.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/static/koboldai.js b/static/koboldai.js index 36013b38..e268becb 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -3085,12 +3085,12 @@ function gametextwatcher(records) { if (!dirty_chunks.includes(chunk.getAttribute("chunk"))) { dirty_chunks.push(chunk.getAttribute("chunk")); //Stupid firefox sometimes looses focus as you type after deleting stuff. Fix that here - //var sel = window.getSelection(); - //if (sel.anchorNode instanceof HTMLElement) { - // sel.anchorNode.focus(); - //} else { - // game_text.focus(); - //} + var sel = window.getSelection(); + if (sel.anchorNode instanceof HTMLElement) { + sel.anchorNode.focus(); + } else { + game_text.focus(); + } } } }