Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResizeObserver loop completed with undelivered notifications. Still occurs #8517

Open
3 tasks
hrb-hub opened this issue Feb 11, 2025 · 0 comments · Fixed by #8523
Open
3 tasks

ResizeObserver loop completed with undelivered notifications. Still occurs #8517

hrb-hub opened this issue Feb 11, 2025 · 0 comments · Fixed by #8523
Assignees
Labels
android issues that concern the android client but not all clients bug broken functionality, usability problems, unexpected errors

Comments

@hrb-hub
Copy link
Contributor

hrb-hub commented Feb 11, 2025

Related to #8417

While there was a fix for the Pinch Zoom ResizeObserver, we are still receiving reports (less than before, but still).

We only managed to reproduce it on android using a debugger, specifically by:

  • Placing a breakpoint inside the resize handler of src/common/gui/base/List.ts
if (typeof ResizeObserver !== "undefined") {
	new ResizeObserver(() => {
		this.updateSize()  // *breakpoint
	}).observe(this.containerDom)
} else {
	requestAnimationFrame(() => this.updateSize())
}
  • Switching from mail view to search view and back. Resuming whenever the breakpoint is hit.

Since we don't yet have a way to reliably reproduce the issue, we can make all observers handle events in a requestAnimationFrame. Though we need to keep an eye on reports to make sure the issue no longer occur.

Test notes

@hrb-hub hrb-hub self-assigned this Feb 11, 2025
@hrb-hub hrb-hub added the bug broken functionality, usability problems, unexpected errors label Feb 11, 2025
hrb-hub added a commit that referenced this issue Feb 12, 2025
createResizeObserver returns a ResizeObserver that handles resize events
in a `requestAnimationFrame`.
This is done to prevent `ResizeObserver loop completed with undelivered
notifications` errors, which can happen when excessively resizing an
observed element, resulting in resize events being deferred to the next
render cycle.

Close #8517
@hrb-hub hrb-hub added the android issues that concern the android client but not all clients label Feb 13, 2025
BijinDev pushed a commit that referenced this issue Feb 14, 2025
createResizeObserver returns a ResizeObserver that handles resize events
in a `requestAnimationFrame`.
This is done to prevent `ResizeObserver loop completed with undelivered
notifications` errors, which can happen when excessively resizing an
observed element, resulting in resize events being deferred to the next
render cycle.

Close #8517
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android issues that concern the android client but not all clients bug broken functionality, usability problems, unexpected errors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant