-
Notifications
You must be signed in to change notification settings - Fork 152
fix: change popover position to fixed to resolve position issues in absolute layouts #1114
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: c7f2213 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
d8bef2a
to
0424d41
Compare
I have read the CLA Document and I hereby sign the CLA |
recheck |
0424d41
to
c7f2213
Compare
@shairez Hey Shai 👋 I hope you're well. It would nice if you could review this tiny PR whenever you have some free time. |
commit: |
thanks @ignatvilesov ! @thejackshelton what is your opinion about this change? |
Positioned elements around an anchor should not be fixed. They are purposely absolute, making them fixed would break a lot of existing apps. To see this in practice, you can edit the css locally in the browser on the qwik ui popover docs from absolute to fixed. That said, position fixed and
Hey @ignatvilesov! Appreciate the initiative on a PR. Have you tried making the outside containing block position relative? It looks like your tooltip does not have a relative container, absolute as a result is going to the bottom of the closest containing block (with the viewport being the last containing block, this goes into the layout algorithms of positioning). Floating UI recommends the absolute strategy as that is the recommended and performant default. I'd be open to exposing an option to having the ability to change strategies and documenting it if there was a clear and common use case for fixed, but if it is just an issue with containing blocks, then that is a behavior of CSS itself. Hope this helps in figuring out the containing block issue 🙏 . In either case as a last resort you can override the styles in your project, as that is the purpose of the styles in an |
What is it?
Why is it needed?
Popover
is positioned incorrectly in absolute scrollable containers like virtual tables.Before
After
Checklist:
pnpm change
and documented my changes