Currently, I'm utilizing the ResizeObserver
in Angular to monitor the size of an element.
observer = new window.ResizeObserver(entries => {
...
someComponent.width = width;
});
observer.observe(target);
Check out this working example on StackBlitz
Everything runs smoothly when testing the code on Safari, Firefox, or Chrome 63.
https://i.sstatic.net/q49CH.gif
However, with the release of Chrome 64 (according to Can I Use, now with native support), the functionality suddenly stops working as intended:
https://i.sstatic.net/DkeBD.gif
It seems that Chrome 64 fails to trigger change detection for events from the ResizeObserver
.
Any insights or suggestions on what might be causing this unexpected behavior?
UPDATE: Based on the discussion below, I have made some updates to my post.