Offset modifier pushes part of popover outside viewport (Popper)

347 Views Asked by At

Using offset: '0,-30px' in my Popper modifier. It works but now my popover doesn't fit within the viewport in some situations. Annoyingly, either Popper applies an offset or it ensures popover fits viewport, but not both.

Is there any way to make the offset work while Popper still ensures popover fits viewport? (basically telling Popper to apply offset except when doing so creates viewport fit problems)

1

There are 1 best solutions below

0
On

That is not the use of offset, please review the documentation for offset. It will simply set the spacing, regardless of the page size.