Cannot center a popper on the screen
See original GitHub issueCodePen demo
https://codepen.io/anon/pen/WyzXEB
Steps to reproduce the problem
- Go to the codepen and observe the box is not centered
What is the expected behavior?
I would expect an offset of 50vh
and positionFixed: true
to allow me to position a popper in the center of the screen, not attached to any specific element, but just attached to html or body.
What went wrong?
The offsets do not work reliably, and there seems to be no way to position a popper always fixed in the center of the screen.
Any other comments?
I really need support for centering a popper in the window, so I can finish converting Shepherd to use popper. Most of it works great, but it also needs to support showing a popper in the middle of the window centered horizontally and vertically, not attached to any elements.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Top Results From Across the Web
Cannot center a popper on the screen · Issue #642 - GitHub
I really need support for centering a popper in the window, so I can finish converting Shepherd to use popper. Most of it...
Read more >MUI Popper: Placement not working as intended when using ...
I have a Box and upon clicking it, I open a popper that has some inputs. I am using ref ...
Read more >Everything I Know About Positioning Poppers (Tooltips ...
If it's positioned on the left, the text will be clipped and unable to be viewed, while on the right, it will cause...
Read more >Prevent Overflow - Popper
The preventOverflow modifier prevents the popper from being cut off by moving it so that it stays visible within its boundary area. Don't...
Read more >How to Build a Dynamically Positioned ... - Elegant Themes
Add Content to Popover Row · Button Alignment: center · Use Custom Styles for Button: YES · Button Border Width: 1px · Button...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In case someone needs this for Popper v2:
We ended up using
computeStyle
for this and manually setting the styles.