-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
html {position: relative} breaks adaptive positioning with strategy "absolute" #1138
Comments
It seems like the popper disappears from the document entirely in this case... I tried to position in view but couldn't find where it even was. Simple fix: add |
It's still there, at the very bottom of the page, as that's what it's being positioning from. It's just using the wrong offset (
I wish it was that simple for us, unfortunately for us that breaks various other styling aspects of our app. (i.e. the modals for which some crazy things have to be done to prevent scrolling of the page behind them on Safari iOS...) So, yeah... would be much appreciated if this could be fixed in the library if possible. |
But it seems to only work with Edit: it's But why |
It's the only robust way (that I know of) to allow an absolutely positioned element (think semi-transparent modal backdrop) to take up the whole height of a scrollable page. Without it, the element won't extend past the height of the initial viewport. However it seems like moving |
Hi @atomiks , thanks so much for addressing this issue so quickly. I only got around to verifying #1141 now and it looks like that PR didn't fix it – the popper now scrolls along with the page. (See here for a screen capture of the same reproduction demo with updated dependency in case it's still relevant.) However it looks like you noticed yourself – I just tried your latest code from the new PR #1148 and that seems to be working fine in both Chrome and Firefox for me, even though the reproduction demo isn't exactly the same. (Is there a way to use a PR branch like that in Codesandbox, without cloning the repo to my local machine? Would make verifying PRs much easier. |
It seems like this issue needs to be reopened. I'm having a similar problem, except that I'm not using test.zip (run Disabling adaptive positioning fixes it. |
I just found this FAQ that reminds you to make sure you have |
CodeSandbox demo
https://codesandbox.io/s/immutable-rgb-i2bxu?file=/src/index.js
Screencap
Steps to reproduce the problem
position: relative
to the document's root/html elementplacement: 'bottom'
and the defaultstrategy: 'absolute'
and adaptive positioningWhat is the expected behavior?
The popper should stay attached to the reference as it flips to the top edge of the reference
What went wrong?
The popper is misplaced (disappears outside of view) when the adaptive "flip to top" behaviour is triggered
Any other comments?
strategy: 'fixed'
will prevent this issue from happening, however especially adaptive positioning is extremely useful for the use case of dropdown menus which is especially affected by this bug.The text was updated successfully, but these errors were encountered: