Invert if cssAutofit

f649e4698b749c62c6f3c413605fb77d874f2569

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

1 files changed, +6 -3Showing whitespace changes
public/scripts/RossAscends-mods.js+6 -3
@@ -916,7 +916,12 @@ export function initRossMods() {
916916 }
917917
918918 sendTextArea.addEventListener('input', () => {
919- if (!cssAutofit) {
919+ saveUserInputDebounced();
920+
921+ if (cssAutofit) {
922+ return;
923+ }
924+
920925 const hasContent = sendTextArea.value !== '';
921926 const fitsCurrentSize = sendTextArea.scrollHeight <= sendTextArea.offsetHeight;
922927 const isScrollbarShown = sendTextArea.clientWidth < sendTextArea.offsetWidth;
@@ -924,8 +929,6 @@ export function initRossMods() {
924929 const needsDebounce = hasContent && (fitsCurrentSize || (isScrollbarShown && isHalfScreenHeight));
925930 if (needsDebounce) autoFitSendTextAreaDebounced();
926931 else autoFitSendTextArea();
927- }
928- saveUserInputDebounced();
929932 });
930933
931934 restoreUserInput();