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

Occasional redundant resize notifications #7

Closed
tibineagu opened this issue Dec 13, 2018 · 0 comments
Closed

Occasional redundant resize notifications #7

tibineagu opened this issue Dec 13, 2018 · 0 comments

Comments

@tibineagu
Copy link
Contributor

tibineagu commented Dec 13, 2018

At this line in ResizeObserver.vue, the notify event is being emitted for every detected "resize" of the _resizeObject.

However, in some situations, if you debug the values of this.$el.offsetWidth and this.$el.offsetHeight, they are the same across all the occurrences of the resize event (which leads me to think that they're likely caused by sub-pixel varations in the height of the object).

This is related to this issue in vue-virtual-scroller where the redundant notifications generate an infinite loop of height recalculations in the DynamicScroller component.

I think the correct behaviour should be to only trigger the resize notification if the calculated dimensions of the wrapper element have also changed.


EDIT: Opened PR #8 for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant