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

[resize-observer] add possibility to observe offset changes #3877

Closed
HolgerJeromin opened this issue Apr 26, 2019 · 3 comments
Closed

[resize-observer] add possibility to observe offset changes #3877

HolgerJeromin opened this issue Apr 26, 2019 · 3 comments

Comments

@HolgerJeromin
Copy link

In the entries of the ResizeObserver we have the contentRect and/or borderBoxSize.

For our application we need to call code when the offset and size of a Element has changed.
But sadly the ResizeObserver is not called when the position has changed.
For us it would be nice if I could add an option to observe the offset, too.

Observing the attributes with MutationObserver and checking a diff in all boundingRects has the downside of forced reflow in many cases.

ref #3550 where delivering offsets was rejected, as they are not observed.

@tabatkins
Copy link
Member

So this sounds like it's a duplicate of #3550, then? Would you like to describe your use-case in that issue, and I'll go ahead and close this one?

@HolgerJeromin
Copy link
Author

So this sounds like it's a duplicate of #3550, then?

Not in my view, see:

...to not include the offsets of the box that is being observed as the offsets are not actually be observed...

Adding these to the observe list was not discussed.

@mootari
Copy link

mootari commented Sep 2, 2021

Shouldn't this issue be reopened, since it is not a duplicate of #3550 according to #3877 (comment)?

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

No branches or pull requests

3 participants