mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-02-02 02:26:45 +01:00
Use a more robust scheme for restorePrompt
The original way didn't work properly in Firefox on Android when you select all text and replace it with something else.
This commit is contained in:
parent
e8cefcc2c6
commit
f632ad9880
@ -881,8 +881,8 @@ function syncAllModifiedChunks(including_selected_chunks=false) {
|
||||
}
|
||||
|
||||
function restorePrompt() {
|
||||
if($("#gametext > chunk").length == 0 && game_text[0].innerText.trim().length) {
|
||||
saved_prompt = game_text[0].innerText.replace(/\u00a0/g, " ");
|
||||
if(game_text[0].firstChild.nodeType === 3) {
|
||||
saved_prompt = game_text[0].firstChild.textContent.replace(/\u00a0/g, " ");
|
||||
unbindGametext();
|
||||
game_text[0].innerText = "";
|
||||
bindGametext();
|
||||
|
Loading…
x
Reference in New Issue
Block a user