From a94af2678b01581fd39ce1b10df2854bcde13dfb Mon Sep 17 00:00:00 2001 From: Wolfsblvt Date: Wed, 15 May 2024 23:47:31 +0200 Subject: [PATCH] Re-enable autofit height on plaintext key input --- public/scripts/world-info.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index c44d08ac4..604b03f3e 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -1578,13 +1578,14 @@ function getWorldEntry(name, data, entry) { }); input.val(entry[entryPropName].join(', ')).trigger('input', { skipReset: true }); } + return { isFancy: isFancyInput, control: input }; } // key - enableKeysInput('key', 'keys'); + const keyInput = enableKeysInput('key', 'keys'); // keysecondary - enableKeysInput('keysecondary', 'secondary_keys'); + const keySecondaryInput = enableKeysInput('keysecondary', 'secondary_keys'); // draw key input switch button template.find('.switch_input_type_icon').on('click', function () { @@ -1792,8 +1793,8 @@ function getWorldEntry(name, data, entry) { if (counter.data('first-run')) { counter.data('first-run', false); countTokensDebounced(counter, contentInput.val()); - // initScrollHeight(keyInput); - // initScrollHeight(keySecondaryInput); + if (!keyInput.isFancy) initScrollHeight(keyInput.control); + if (!keySecondaryInput) initScrollHeight(keySecondaryInput.control); } });