mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-07 15:48:46 +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', () => {
|
$(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();
|
autoFitSendTextArea();
|
||||||
} else {
|
} else {
|
||||||
autoFitSendTextAreaDebounced();
|
autoFitSendTextAreaDebounced();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user