Fix scrolling behavior
| @@ -2087,6 +2087,9 @@ export function appendMediaToMessage(mes, messageElement, adjustScroll = true) { | ||
| 2087 | 2087 | const chatHeight = adjustScroll && (hasMedia || hasFiles) ? chatElement.prop('scrollHeight') : 0; |
| 2088 | 2088 | const scrollPosition = chatElement.scrollTop(); |
| 2089 | 2089 | const doAdjustScroll = () => { |
| 2090 | + if (!hasMedia && !hasFiles) { | |
| 2091 | + return; | |
| 2092 | + } | |
| 2090 | 2093 | if (!adjustScroll) { |
| 2091 | 2094 | chatElement.scrollTop(scrollPosition); |
| 2092 | 2095 | return; |