Invert if cssAutofit
| @@ -916,7 +916,12 @@ export function initRossMods() { | ||
| 916 | 916 | } |
| 917 | 917 | |
| 918 | 918 | sendTextArea.addEventListener('input', () => { |
| 919 | - if (!cssAutofit) { | |
| 919 | + saveUserInputDebounced(); | |
| 920 | + | |
| 921 | + if (cssAutofit) { | |
| 922 | + return; | |
| 923 | + } | |
| 924 | + | |
| 920 | 925 | const hasContent = sendTextArea.value !== ''; |
| 921 | 926 | const fitsCurrentSize = sendTextArea.scrollHeight <= sendTextArea.offsetHeight; |
| 922 | 927 | const isScrollbarShown = sendTextArea.clientWidth < sendTextArea.offsetWidth; |
| @@ -924,8 +929,6 @@ export function initRossMods() { | ||
| 924 | 929 | const needsDebounce = hasContent && (fitsCurrentSize || (isScrollbarShown && isHalfScreenHeight)); |
| 925 | 930 | if (needsDebounce) autoFitSendTextAreaDebounced(); |
| 926 | 931 | else autoFitSendTextArea(); |
| 927 | - } | |
| 928 | - saveUserInputDebounced(); | |
| 929 | 932 | }); |
| 930 | 933 | |
| 931 | 934 | restoreUserInput(); |