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 () {
97329732 * @param {HTMLTextAreaElement} e Textarea element to auto-fit
97339733 */
97349734 function autoFitEditTextArea(e) {
9735+ const scrollTop = chatElement.scrollTop();
97359736 e.style.height = '0px';
97369737 const newHeight = e.scrollHeight + 4;
97379738 e.style.height = `${newHeight}px`;
9739+ chatElement.scrollTop(scrollTop);
97389740 }
97399741 const autoFitEditTextAreaDebounced = debounce(autoFitEditTextArea, debounce_timeout.short);
97409742 document.addEventListener('input', e => {