Second welcome bug fix

This commit is contained in:
ebolam
2023-04-26 20:16:28 -04:00
parent 7d986effa1
commit 4bd193afe0

View File

@@ -286,8 +286,6 @@ function reset_story() {
for (const item of temp) { for (const item of temp) {
item.remove(); item.remove();
} }
//document.getElementById("Selected Text").setAttribute("contenteditable", "false");
document.getElementById("story_prompt").setAttribute("contenteditable", "false");
//clear any options //clear any options
var option_area = document.getElementById("Select Options"); var option_area = document.getElementById("Select Options");
@@ -316,8 +314,11 @@ function reset_story() {
text += "\xa0 "; text += "\xa0 ";
} }
document.getElementById("welcome_text").innerText = text; document.getElementById("welcome_text").innerText = text;
document.getElementById("Selected Text").setAttribute("contenteditable", "false");
if (document.getElementById("story_prompt").innerText == "") { if (document.getElementById("story_prompt").innerText == "") {
document.getElementById("welcome_container").classList.remove("hidden"); document.getElementById("welcome_container").classList.remove("hidden");
document.getElementById("Selected Text").setAttribute("contenteditable", "true");
} }
document.getElementById('main-grid').setAttribute('option_length', 0); document.getElementById('main-grid').setAttribute('option_length', 0);
@@ -679,7 +680,6 @@ function do_prompt(data) {
document.getElementById('themerow').classList.remove("hidden"); document.getElementById('themerow').classList.remove("hidden");
addInitChatMessage(); addInitChatMessage();
} }
document.getElementById("story_prompt").classList.remove("dirty");
} }