atomiks / tippyjs

Tooltip, popover, dropdown, and menu library
https://atomiks.github.io/tippyjs/
MIT License
11.78k stars 517 forks source link

popups appearing outside viewport on iPad #1140

Open vertex-github opened 8 months ago

vertex-github commented 8 months ago

Bug description

Ive got a tippy popup that sometimes appears partially outside the viewport. I have similar issues on desktop when I had the inspector open. I tried adding:

    popperOptions : {
        modifiers : [{
            name: 'preventOverflow',
            options:{
                enabled:true,
                boundariesElement : 'window'
            }
        }
        ]

to the tippy options, but I can still get the popup outside the viewport on both desktop and an iPad - the popup is sometimes appearing off screen at the top.

I am constructing the content inside the onShow() method (setting the content from HTML I built up inline) but the popup isnt open at that point - or has tippy already calculated the size before it calls onShow ?

vertex-github commented 8 months ago

https://codepen.io/vertex-github/pen/ZEwYeZd actually works worse than in my app - nothing is showing inside the viewport here.