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
{{ message }}
Repository navigation
EuiResizeObserver fallback does not work for pure resizing #3044
Safari and IE11 are the two browsers we support which do not have ResizeObserver. For those, we fall back to a MutationObserver watching for all changes. While that catches when mutation cause a different size, it incorrectly:
misses size changes caused by a window resize
catches content changes that do not affect size
misses size changes caused by changes in a document's CSS
I don't think we should try addressing the third one, but wanted to include it for completeness. The other two should be fixed by changing the fallback to:
listen for resize events
confirm that a newly computed size is, in fact, different from the previously known one
We can check for hasResizeObserver in ComponentDidMount. If true, we can follow the code or if false, we can listen to an event of resize (supported by all browser).
We can use a resize event only as it is supported by every browser.
Activity
mridulgogia commentedon Mar 11, 2020
There are two possible solutions:
PeterSenpai commentedon Mar 16, 2020
Hi there, I have a PR up for the fix. Take a look when you have time.