Firefox: restore chat scroll top on edit textarea autofit
| @@ -9732,9 +9732,11 @@ jQuery(async function () { | ||
| 9732 | 9732 | * @param {HTMLTextAreaElement} e Textarea element to auto-fit |
| 9733 | 9733 | */ |
| 9734 | 9734 | function autoFitEditTextArea(e) { |
| 9735 | + const scrollTop = chatElement.scrollTop(); | |
| 9735 | 9736 | e.style.height = '0px'; |
| 9736 | 9737 | const newHeight = e.scrollHeight + 4; |
| 9737 | 9738 | e.style.height = `${newHeight}px`; |
| 9739 | + chatElement.scrollTop(scrollTop); | |
| 9738 | 9740 | } |
| 9739 | 9741 | const autoFitEditTextAreaDebounced = debounce(autoFitEditTextArea, debounce_timeout.short); |
| 9740 | 9742 | document.addEventListener('input', e => { |