Implement more smart textarea autosizes

This commit is contained in:
Cohee
2024-09-05 20:55:06 +03:00
parent 758c90be00
commit 2f5e40691c
6 changed files with 38 additions and 22 deletions

View File

@ -59,8 +59,10 @@ async function doTokenCounter() {
$('#tokenized_chunks_display').text('—');
}
await resetScrollHeight($('#token_counter_textarea'));
await resetScrollHeight($('#token_counter_ids'));
if (!CSS.supports('field-sizing', 'content')) {
await resetScrollHeight($('#token_counter_textarea'));
await resetScrollHeight($('#token_counter_ids'));
}
}, debounce_timeout.relaxed);
dialog.find('#token_counter_textarea').on('input', () => countDebounced());