-
Notifications
You must be signed in to change notification settings - Fork 982
Fix position when use anchor css properties #1995
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
Fix position when use anchor css properties #1995
Conversation
I can see that fixes the issue, but I'm a little unclear as to why it needs to be in this middleware, or why it happens. |
@benoitgrelard My understanding is that when the content is mounted all middlewares use the initial width which would be the total size of the content, let's say In fact, this code is very similar to the one internally in the |
Just to add my experience here. Without knowing the implementation details what it seems like is happening is that it is calculating the position of the |
I see that makes sense.
If we did this, would this mean we don't need all this extra logic as it would already be invalidated by the internals of the size middleware? |
Yes, what I understood is that |
Let's try that then as I think it might make more sense to group anything size related within that middleware and not have the extra invalidation code as its the same concern. |
I had to change the position of the |
This still happens in |
Description
Reset the middleware lifecycle to calculate the right position when using
--radix-popper-anchor-width
or--radix-popper-anchor-height
.See the behavior in some primitives although works with
Select
https://codesandbox.io/p/sandbox/cocky-wood-wgqnuy
Fixes #1968
Fixes #2017