Don't autofit immediately if a scrollbar is visible at max height

63ddb81ef7773c4c6062ec0faa8d08182f5df564

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -1Ignore whitespace
public/scripts/RossAscends-mods.js+2 -1
@@ -882,7 +882,8 @@ export function initRossMods() {
882882 });
883883
884884 $(sendTextArea).on('input', () => {
885- if (sendTextArea.scrollHeight > sendTextArea.offsetHeight || sendTextArea.value === '') {
885+ const scrollbarShown = sendTextArea.clientWidth < sendTextArea.offsetWidth && sendTextArea.offsetHeight >= window.innerHeight / 2;
886+ if ((sendTextArea.scrollHeight > sendTextArea.offsetHeight && !scrollbarShown) || sendTextArea.value === '') {
886887 autoFitSendTextArea();
887888 } else {
888889 autoFitSendTextAreaDebounced();