From 370033f857d2e9d064ffb13018e82f53388e15a1 Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Thu, 4 May 2023 23:09:54 +0900 Subject: [PATCH] fixed WI entry secondary height --- public/scripts/world-info.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 3bc092016..e8f9ee1e6 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -183,6 +183,7 @@ function appendWorldEntry(entry) { saveWorldInfo(); }); keySecondaryInput.val(entry.keysecondary.join(",")).trigger("input"); + initScrollHeight(keySecondaryInput); // comment const commentInput = template.find('textarea[name="comment"]'); @@ -194,6 +195,7 @@ function appendWorldEntry(entry) { saveWorldInfo(); }); commentInput.val(entry.comment).trigger("input"); + //initScrollHeight(commentInput); // content const contentInput = template.find('textarea[name="content"]'); @@ -212,6 +214,7 @@ function appendWorldEntry(entry) { .html(numberOfTokens); }); contentInput.val(entry.content).trigger("input"); + //initScrollHeight(contentInput); // selective const selectiveInput = template.find('input[name="selective"]'); @@ -318,6 +321,8 @@ async function resetScrollHeight(element) { async function initScrollHeight(element) { await delay(1); const height = Number($(element).prop("scrollHeight") + 3); + console.log(height); + //console.log(element.style.height); $(element).css("height", ""); $(element).css("height", `${height}px`); }