You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Watch body height change with resize observer. Don't debounce, as it triggers max. 60 times per second anyway (every 10 ms)
Also watch window resizes (only shrinks!). As one resizes the window, we'd want to update the scroll position (e.g.). Debounce (not throttle).
Scroll to bottom on the following events:
freshly navigated to chat view (no event necessary, no conflict if resize observer fires)
new element gets added to chat view, and it's either mine or I was(!!) already scrolled to the bottom (resize observer event, no conflict with window resize)
window resize, and I was already scrolled to the bottom (window resize event, no conflict with resize observer)
Event
Condition
Action
freshly navigated to chat view
true
scrollToBottom
resize observer event (on body element)
latest element is either mine or I was(!!) already scrolled to the bottom
scrollToBottom
window resize (debounced!)
I was already scrolled to the bottom
scrollToBottom
-
-
-
freshly navigated to thread view
true
scrollToTop (I think this is happening automatically)
thread view should auto-scroll up on:
Also switch to a scroll trigger based on scroll height diff and not element insertion.
The text was updated successfully, but these errors were encountered: