Paste bug fix

This commit is contained in:
ebolam
2023-04-26 16:16:13 -04:00
parent dbd6558733
commit 45e4a278dc
2 changed files with 5 additions and 1 deletions

View File

@@ -3065,6 +3065,10 @@ function set_edit(event) {
return true;
}
function check_game_after_paste() {
setTimeout(function() {savegametextchanges();}, 500);
}
function gametextwatcher(records) {
//Here we want to take care of two possible events
//User deleted an action. For this we'll restore the action and set it's text to "" and mark it as dirty

View File

@@ -53,7 +53,7 @@
<div id="welcome_text" class="var_sync_model_welcome" draggable="False"></div>
</div>
<div class="gametext" id="Selected Text" contenteditable=false tabindex=0 onfocusout="savegametextchanges();" onclick="return set_edit(event)" onkeyup="return set_edit(event);">
<div class="gametext" id="Selected Text" contenteditable=false tabindex=0 onpaste="check_game_after_paste()" onfocusout="savegametextchanges();" onclick="return set_edit(event)" onkeyup="return set_edit(event);">
<span id="story_prompt" class="var_sync_story_prompt var_sync_alt_story_prompt_in_ai rawtext hidden" chunk="-1"></span></div><!--don't move the /div down or it'll cause odd spacing issues in the UI--->
</div>