| 699 | const isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1; | 699 | const isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1; |
| 700 | | 700 | |
| 701 | /** | 701 | /** |
| 702 | * Resizes the chat input textarea vertically to match its text content, up to a maximum height defined in CSS. | 702 | * this makes the chat input text area resize vertically to match the text size (limited by CSS at 50% window height) |
| 703 | * Preserves scroll position in Chrome. In Firefox, the textarea grows to cover the chat history. | | |
| 704 | */ | 703 | */ |
| 705 | function autoFitSendTextArea() { | 704 | function autoFitSendTextArea() { |
| 706 | const originalScrollBottom = chatBlock.scrollHeight - (chatBlock.scrollTop + chatBlock.offsetHeight); | 705 | const originalScrollBottom = chatBlock.scrollHeight - (chatBlock.scrollTop + chatBlock.offsetHeight); |