mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'dev' of https://github.com/SillyLossy/TavernAI into dev
This commit is contained in:
@ -183,6 +183,7 @@ function appendWorldEntry(entry) {
|
|||||||
saveWorldInfo();
|
saveWorldInfo();
|
||||||
});
|
});
|
||||||
keySecondaryInput.val(entry.keysecondary.join(",")).trigger("input");
|
keySecondaryInput.val(entry.keysecondary.join(",")).trigger("input");
|
||||||
|
initScrollHeight(keySecondaryInput);
|
||||||
|
|
||||||
// comment
|
// comment
|
||||||
const commentInput = template.find('textarea[name="comment"]');
|
const commentInput = template.find('textarea[name="comment"]');
|
||||||
@ -194,6 +195,7 @@ function appendWorldEntry(entry) {
|
|||||||
saveWorldInfo();
|
saveWorldInfo();
|
||||||
});
|
});
|
||||||
commentInput.val(entry.comment).trigger("input");
|
commentInput.val(entry.comment).trigger("input");
|
||||||
|
//initScrollHeight(commentInput);
|
||||||
|
|
||||||
// content
|
// content
|
||||||
const contentInput = template.find('textarea[name="content"]');
|
const contentInput = template.find('textarea[name="content"]');
|
||||||
@ -212,6 +214,7 @@ function appendWorldEntry(entry) {
|
|||||||
.html(numberOfTokens);
|
.html(numberOfTokens);
|
||||||
});
|
});
|
||||||
contentInput.val(entry.content).trigger("input");
|
contentInput.val(entry.content).trigger("input");
|
||||||
|
//initScrollHeight(contentInput);
|
||||||
|
|
||||||
// selective
|
// selective
|
||||||
const selectiveInput = template.find('input[name="selective"]');
|
const selectiveInput = template.find('input[name="selective"]');
|
||||||
@ -318,6 +321,8 @@ async function resetScrollHeight(element) {
|
|||||||
async function initScrollHeight(element) {
|
async function initScrollHeight(element) {
|
||||||
await delay(1);
|
await delay(1);
|
||||||
const height = Number($(element).prop("scrollHeight") + 3);
|
const height = Number($(element).prop("scrollHeight") + 3);
|
||||||
|
console.log(height);
|
||||||
|
//console.log(element.style.height);
|
||||||
$(element).css("height", "");
|
$(element).css("height", "");
|
||||||
$(element).css("height", `${height}px`);
|
$(element).css("height", `${height}px`);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user