mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
"ResizeObserver loop completed with undelivered notifications", from the fit I added: it ran inside the observer's own callback, and measuring means SHOWING the labels and possibly hiding them again - which resizes the very element being observed. So every notification produced a write and the write produced another notification, and the observer never settled. Two changes, and the first is the one that matters. The bar is re-measured only when its WIDTH has changed. In the steady state nothing is written at all: with the labels already hidden and still needing to be, the old code removed the class and added it back on every single cycle. Verified by running the real function against a bar that wraps while its labels are shown - one write to settle, then zero, then zero, and two again only after a genuine width change. And the fit is scheduled for the next frame rather than called inline, so the write is an ordinary one whose resize is delivered normally instead of being raised from inside the callback that is handling the previous resize. The opt-out path now shows the labels in its own branch, since it returns before reaching the measurement. Without that a page that opts out would inherit whatever the last measured page left on the bar - a link from a narrow board to All Boards would land there with the names hidden - and the guard checks that branch rather than the statement order it used to rely on. Thanks to xet7 !