-
-
Notifications
You must be signed in to change notification settings - Fork 98
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 #650
Comments
@MurhafSousli I checked out 16.0.0-beta.0, but was still able to reproduce this bug. |
@MurhafSousli after debugging a little the beta version, I think the issue lies in
sensorThrottleTime !) and subsequently updateDimensions /TrackXDirective.update possibly change relevant dom/layout.
Additionally I found another suspicious code fragment: ngx-scrollbar/cdk/src/cdk-virtual-scroll.ts:51 - there is no throtteling at all - I'm not 100% sure if there are situations where the updated styles have effects on the observed size, but a (Hope my comments help and do not create further confusion ;) ) |
@daniel-sc Ignore the throttle function, there is no throttling by default unless you set a duration. Also the observer in Were you able to reproduce the error? And with what are you testing it? standard scrollbar or a virtual scroll? |
@MurhafSousli Yes, I am able to consistently reproduce the error with Firefox in our app - I'll try to note the relevant setup, as a shareable reproduction is not as simple:
function getThrottledStream(stream, duration) {
return duration ? stream.pipe(
+ debounceTime(0),
throttleTime(duration, null, {
leading: true,
trailing: true
})
) : stream;
} |
I am really interested in a reproduction, I want to learn with what kind of content this error is happening and maybe it opens my eyes about a possible bug. that should be possible with a stackblitz. |
I tried to create a reproduction before (and failed) - if it would be possible to have a short call tomorrow, I can show this to you - maybe thats faster? If this would work for you, just send an appointment to daniel.schreiber [at] ti8m.ch |
@MurhafSousli Ok, I finally managed to create a reproduction: https://github.com/daniel-sc/ngx-scrollbar-reproduce-resize-observer-loop-error If you have any questions or cannot reproduce it, please let me know! |
Should be fixed in v16 beta2, try it out and let me know if it fixes the issue. |
@MurhafSousli it looks like it is fixed with beta2! Thanks very much for your responsiveness!! |
Reproduction
I am not able to provide a reproduction - it seems this is only happening with some "load".
But I was able to patch this library locally to fix this problem - I'll provide a PR immediately!
This error can be observed in Firefox by
Expected Behavior
This error should not happen under regular circumsstances - see https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver#observation_errors
Actual Behavior
Error:
Environment
The text was updated successfully, but these errors were encountered: