mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02: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:
@@ -881,8 +881,8 @@ function syncAllModifiedChunks(including_selected_chunks=false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function restorePrompt() {
|
function restorePrompt() {
|
||||||
if($("#gametext > chunk").length == 0 && game_text[0].innerText.trim().length) {
|
if(game_text[0].firstChild.nodeType === 3) {
|
||||||
saved_prompt = game_text[0].innerText.replace(/\u00a0/g, " ");
|
saved_prompt = game_text[0].firstChild.textContent.replace(/\u00a0/g, " ");
|
||||||
unbindGametext();
|
unbindGametext();
|
||||||
game_text[0].innerText = "";
|
game_text[0].innerText = "";
|
||||||
bindGametext();
|
bindGametext();
|
||||||
|
Reference in New Issue
Block a user