Switch back to regular debounce

This commit is contained in:
Cohee
2024-07-12 16:03:43 +00:00
parent 684ce999f3
commit 3acd60fcab
2 changed files with 3 additions and 4 deletions

View File

@ -156,7 +156,6 @@ import {
ensureImageFormatSupported,
flashHighlight,
isTrueBoolean,
debouncedThrottle,
} from './scripts/utils.js';
import { debounce_timeout } from './scripts/constants.js';
@ -9240,7 +9239,7 @@ jQuery(async function () {
e.style.height = `${newHeight}px`;
is_use_scroll_holder = true;
}
const autoFitEditTextAreaDebounced = debouncedThrottle(autoFitEditTextArea, debounce_timeout.short);
const autoFitEditTextAreaDebounced = debounce(autoFitEditTextArea, debounce_timeout.short);
document.addEventListener('input', e => {
if (e.target instanceof HTMLTextAreaElement && e.target.classList.contains('edit_textarea')) {
const immediately = e.target.scrollHeight > e.target.offsetHeight || e.target.value === '';