Commit b6fcbd79 authored by Robert Knight's avatar Robert Knight Committed by Eduardo

Add note about limitations of scroll container size change detection

The window `resize` event is good enough for the current use case and
works in all browsers, but wouldn't work if the ThreadList could change
size independently of the iframe/window.
parent cf110484
......@@ -73,6 +73,10 @@ function ThreadList({ threads }) {
);
listeners.add(scrollContainer, 'scroll', updateScrollPosition);
// We currently assume that the scroll container's size only changes with
// the window as a whole. A more general approach would involve using
// ResizeObserver via the `observeElementSize` utility.
listeners.add(window, 'resize', updateScrollPosition);
return () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment