From 0371fa1782f577b081cb7b31a4d45b1b8b5c1276 Mon Sep 17 00:00:00 2001 From: ebolam Date: Sun, 27 Nov 2022 11:51:13 -0500 Subject: [PATCH] Fix for issue 318 --- static/koboldai.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/static/koboldai.js b/static/koboldai.js index 6e393272..fbfb92b7 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -285,10 +285,8 @@ function create_options(action) { //Let's check if we only have a single redo option. In that case we din't show as the user can use the redo button seen_prev_selection = false; show_options = false; - console.log(action.action.Options); for (item of action.action.Options) { if (!(item['Previous Selection'])) { - console.log(item); show_options = true; break; } else if (item['Previous Selection']) { @@ -300,7 +298,6 @@ function create_options(action) { } } } - console.log("seen_prev_selection: "+seen_prev_selection+" show_options: "+show_options); if (!(show_options)) { document.getElementById('main-grid').setAttribute('option_length', 0); return; @@ -2882,7 +2879,7 @@ function select_game_text(event) { } else { new_selected_game_chunk = document.selection.createRange().parentElement().parentElement(); } - } else { + } else if (window.getSelection().anchorNode != null ) { if(window.getSelection().anchorNode.parentNode) { if (window.getSelection().anchorNode.parentNode.id == 'story_prompt') { new_selected_game_chunk = window.getSelection().anchorNode.parentNode;