Firefox: restore chat scroll top on edit textarea autofit

0d79bb6f6d8b9bf49256110ebe743a4c41a0d59f

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

1 files changed, +2 -0Showing whitespace changes
public/script.js+2 -0
@@ -9732,9 +9732,11 @@ jQuery(async function () {
9732 * @param {HTMLTextAreaElement} e Textarea element to auto-fit9732 * @param {HTMLTextAreaElement} e Textarea element to auto-fit
9733 */9733 */
9734 function autoFitEditTextArea(e) {9734 function autoFitEditTextArea(e) {
9735 const scrollTop = chatElement.scrollTop();
9735 e.style.height = '0px';9736 e.style.height = '0px';
9736 const newHeight = e.scrollHeight + 4;9737 const newHeight = e.scrollHeight + 4;
9737 e.style.height = `${newHeight}px`;9738 e.style.height = `${newHeight}px`;
9739 chatElement.scrollTop(scrollTop);
9738 }9740 }
9739 const autoFitEditTextAreaDebounced = debounce(autoFitEditTextArea, debounce_timeout.short);9741 const autoFitEditTextAreaDebounced = debounce(autoFitEditTextArea, debounce_timeout.short);
9740 document.addEventListener('input', e => {9742 document.addEventListener('input', e => {