Dynamic Size for popup

I am wondering if there is a way to determine the size of the viewport so that I can dynamically size a popup through scripting. I want it to change sizes depending on if the user is on mobile, or tablet or desktop.

I have just found that you can set the default width of the popup to auto (even though it shows an error) and same with the height. Seems to have solved my problem

1 Like

When you launch the popup there is a field for position which lets you specify the height and width of it. You could link this to the screen size if you wanted to.

The issue here is if the screen size changes, like if the phone goes from portrait to landscape, fixing the width won’t auto adjust the popup size. I’ve suggest before that you can set the min and max width props of the popup that seemed to work, although there were some potentially weird things I found later that i hadn’t ironed out..

Would I add that to the advanced stylesheet?

1 Like

I have played around with creating a position fixed container over top of the view itself and making my own modal popup, but it would just be easier to get the built in popup to work similarly so that it is easier to produce in mass.