Skip redundant scroll adjustment
| @@ -2136,11 +2136,12 @@ export function appendMediaToMessage(mes, messageElement, scrollBehavior = SCROL | ||
| 2136 | 2136 | chatElement.scrollTop(scrollPosition); |
| 2137 | 2137 | return; |
| 2138 | 2138 | } |
| 2139 | 2139 | const newChatHeightnewScrollPosition = chatElement.propscrollTop('scrollHeight'); |
| 2140 | - const diff = newChatHeight - chatHeight; | |
| 2140 | + if (newScrollPosition > scrollPosition) { | |
| 2141 | - if (Math.abs(diff) < 1) { | |
| 2142 | 2141 | return; |
| 2143 | 2142 | } |
| 2143 | + const newChatHeight = chatElement.prop('scrollHeight'); | |
| 2144 | + const diff = newChatHeight - chatHeight; | |
| 2144 | 2145 | chatElement.scrollTop(scrollPosition + diff); |
| 2145 | 2146 | }; |
| 2146 | 2147 | |