From 3cafc22e1de596227973a05d1e99b25ce68c8d4d Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 15 Jun 2024 16:48:35 +0300 Subject: [PATCH] Fix textarea height adjust --- public/scripts/extensions/stable-diffusion/index.js | 8 ++++++++ public/scripts/extensions/stable-diffusion/settings.html | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/public/scripts/extensions/stable-diffusion/index.js b/public/scripts/extensions/stable-diffusion/index.js index 5b824c56f..a55d5efd0 100644 --- a/public/scripts/extensions/stable-diffusion/index.js +++ b/public/scripts/extensions/stable-diffusion/index.js @@ -708,6 +708,14 @@ function onChatChanged() { $('#sd_character_prompt').val(characterPrompt); $('#sd_character_negative_prompt').val(negativePrompt); $('#sd_character_prompt_share').prop('checked', hasSharedData); + adjustElementScrollHeight(); +} + +function adjustElementScrollHeight(){ + resetScrollHeight($('#sd_prompt_prefix')); + resetScrollHeight($('#sd_negative_prompt')); + resetScrollHeight($('#sd_character_prompt')); + resetScrollHeight($('#sd_character_negative_prompt')); } function onCharacterPromptInput() { diff --git a/public/scripts/extensions/stable-diffusion/settings.html b/public/scripts/extensions/stable-diffusion/settings.html index e1a8846b7..970ec2be8 100644 --- a/public/scripts/extensions/stable-diffusion/settings.html +++ b/public/scripts/extensions/stable-diffusion/settings.html @@ -284,16 +284,16 @@ - + - +