From 171bd0f1473941a8b42c18207477a86488b5ca77 Mon Sep 17 00:00:00 2001 From: ebolam Date: Fri, 9 Sep 2022 16:00:19 -0400 Subject: [PATCH] Fix auto-scroll --- static/koboldai.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/koboldai.js b/static/koboldai.js index 9a911534..8363a622 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -286,7 +286,7 @@ function do_story_text_updates(data) { story_area.append(span); clearTimeout(game_text_scroll_timeout); - game_text_scroll_timeout = setTimeout(function() {document.getElementById('gamescreen').scrollTo(0, document.body.scrollHeight);}, 200); + game_text_scroll_timeout = setTimeout(function() {document.getElementById("Selected Text").scrollTop = document.getElementById("Selected Text").scrollHeight;}, 200); if (span.textContent != "") { assign_world_info_to_action(span, null); }