Only init scroll height of WI keys when first opening the drawer

This commit is contained in:
Cohee 2024-04-05 13:53:39 +03:00
parent 3a0ceae80a
commit b1c2617b0d
2 changed files with 4 additions and 2 deletions

View File

@ -4901,7 +4901,7 @@
</span> </span>
</small> </small>
<small class="textAlignCenter" data-i18n="Primary Keywords">Primary Keywords</small> <small class="textAlignCenter" data-i18n="Primary Keywords">Primary Keywords</small>
<textarea class="text_pole keyprimarytextpole autoSetHeight" name="key" rows="1" data-i18n="[placeholder]Comma separated (required)" placeholder="Comma separated (required)" maxlength="2000"></textarea> <textarea class="text_pole keyprimarytextpole" name="key" rows="1" data-i18n="[placeholder]Comma separated (required)" placeholder="Comma separated (required)" maxlength="2000"></textarea>
</div> </div>
<div class="world_entry_form_control"> <div class="world_entry_form_control">
<small class="textAlignCenter" data-i18n="Logic">Logic</small> <small class="textAlignCenter" data-i18n="Logic">Logic</small>
@ -4920,7 +4920,7 @@
</small> </small>
<small class="textAlignCenter" data-i18n="Optional Filter">Optional Filter</small> <small class="textAlignCenter" data-i18n="Optional Filter">Optional Filter</small>
<div class="flex-container flexFlowRow alignitemscenter"> <div class="flex-container flexFlowRow alignitemscenter">
<textarea class="text_pole keysecondarytextpole autoSetHeight" name="keysecondary" rows="1" data-i18n="[placeholder]Comma separated (ignored if empty)" placeholder="Comma separated list" maxlength="2000"></textarea> <textarea class="text_pole keysecondarytextpole" name="keysecondary" rows="1" data-i18n="[placeholder]Comma separated (ignored if empty)" placeholder="Comma separated list" maxlength="2000"></textarea>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1218,6 +1218,8 @@ function getWorldEntry(name, data, entry) {
if (counter.data('first-run')) { if (counter.data('first-run')) {
counter.data('first-run', false); counter.data('first-run', false);
countTokensDebounced(counter, contentInput.val()); countTokensDebounced(counter, contentInput.val());
initScrollHeight(keyInput);
initScrollHeight(keySecondaryInput);
} }
}); });