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
Floating UI Position Incorrect When Modal is Nested Inside Drawer Component #2858
Comments
It is working fine on a small screen; however, if I go fullscreen on this page (https://vitejsvitejzzg6c-drf5--5173--7dbe22a9.local-credentialless.webcontainer.io/) and open the drawer, then clicking on the input field to open the panel causes the floating panel's position to be incorrect. |
Hmm, yeah I see that as well. Not sure what would cause it so will need some investigating.
A new "containing block" gets created in this situation, and most positioning bugs that appear now seem to be related to handling this layout situation Looks like it's related to collision detection when using |
Thank you for sharing the workaround. There is one more issue I found in our application regarding the issue with the hide middleware, it seems that it returns 'hide', which might be causing the panel to not open consistently. Do you think this could be related to the same issue you mentioned earlier
|
Yeah most likely the same issue, if you add |
We have developed custom modal, drawer, and datepicker components as web components using ShadowDOM. These components utilize the 'popover' attribute and 'floating-ui' internally for positioning the datepicker container. However, when we place a modal inside a drawer and then place a datepicker inside the drawer, the floating UI position becomes incorrect.
In the parent modal, I have applied 'transform: translate(-50%,-50%)'. If I remove that, the datepicker and floating UI positions work correctly.
I have created a repository here.
To see the issue, click the 'show drawer' button to open a new drawer on the right side. Then, click the input element; the panel position is incorrect.
Screenshots If applicable, add screenshots to help explain your problem.
Context:
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: