Switch back to regular debounce
This commit is contained in:
parent
684ce999f3
commit
3acd60fcab
|
@ -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 === '';
|
||||
|
|
|
@ -31,7 +31,7 @@ import {
|
|||
SECRET_KEYS,
|
||||
secret_state,
|
||||
} from './secrets.js';
|
||||
import { debounce, debouncedThrottle, getStringHash, isValidUrl } from './utils.js';
|
||||
import { debounce, getStringHash, isValidUrl } from './utils.js';
|
||||
import { chat_completion_sources, oai_settings } from './openai.js';
|
||||
import { getTokenCountAsync } from './tokenizers.js';
|
||||
import { textgen_types, textgenerationwebui_settings as textgen_settings, getTextGenServer } from './textgen-settings.js';
|
||||
|
@ -707,7 +707,7 @@ function autoFitSendTextArea() {
|
|||
chatBlock.scrollTop = newScrollTop;
|
||||
}
|
||||
}
|
||||
export const autoFitSendTextAreaDebounced = debouncedThrottle(autoFitSendTextArea, debounce_timeout.short);
|
||||
export const autoFitSendTextAreaDebounced = debounce(autoFitSendTextArea, debounce_timeout.short);
|
||||
|
||||
// ---------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue