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
Autocomplete box doesn't work with fixed positioning #1199
Comments
linonetwo
added a commit
to tiddly-gittly/tw-command-palette
that referenced
this issue
May 20, 2024
linonetwo
added a commit
to tiddly-gittly/tw-command-palette
that referenced
this issue
May 20, 2024
Thanks for the hack! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When the search field has fixed positioning on the page and you scroll while the autocomplete box is open the box doesn't follow scroll. The box scrolls out of view.
Related code is here:
autocomplete/packages/autocomplete-js/src/getPanelPlacementStyle.ts
Line 25 in 5fd58f6
The problem is that autocomplete uses absolute positioning. To fix this, I suggest to have a configuration to allow it to use fixed positioning instead.
In my project, I was able to work around this issue by doing the following:
Reproduction
My Sandbox: https://codesandbox.io/s/youthful-microservice-6km8p4?file=/style.css:843-880
Steps
Expected behavior
It should be possible to make fixed positioning work without a CSS hack using !important.
Environment
The text was updated successfully, but these errors were encountered: