Open curran opened 1 month ago
Current status: uncovered the fact that multiple resize observers are set up on the same element.
It looks like the constructor is invoked twice for the exact same element.
This could be related to the resize observer error, since each instance of the class assumes that it is the only instance associated with the given element.
It looks like the constructor is invoked twice for the exact same element.
This is probably due to React rendering components twice in the dev StrictMode, which is a known behavior and usually not an issue — Unovis container components should disconnect the observer when destroyed.
Ah yes, great point!
Confirmed - the resize observer gets removed on cleanup.
Maybe the error could be coming from somewhere else...
https://github.com/user-attachments/assets/5fead0ce-6cd8-4e0d-935b-60f0de97ab1c
The error seems to trigger when the vertical scrollbar gets added or removed.
I was able to reproduce this problem after setting "Show scroll bars" to "Always" in the macOS settings.
WIP towards #455