mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-31 11:35:37 +01:00
Don't autofit immediately if a scrollbar is visible at max height
This commit is contained in:
parent
3acd60fcab
commit
63ddb81ef7
@ -882,7 +882,8 @@ export function initRossMods() {
|
||||
});
|
||||
|
||||
$(sendTextArea).on('input', () => {
|
||||
if (sendTextArea.scrollHeight > sendTextArea.offsetHeight || sendTextArea.value === '') {
|
||||
const scrollbarShown = sendTextArea.clientWidth < sendTextArea.offsetWidth && sendTextArea.offsetHeight >= window.innerHeight / 2;
|
||||
if ((sendTextArea.scrollHeight > sendTextArea.offsetHeight && !scrollbarShown) || sendTextArea.value === '') {
|
||||
autoFitSendTextArea();
|
||||
} else {
|
||||
autoFitSendTextAreaDebounced();
|
||||
|
Loading…
x
Reference in New Issue
Block a user