Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Position transition issue in Safari 6 Re: Position transition issue in Safari 6

#143284
bjamieson
Participant

When the modal is displayed I want it to be centered. So at first to hide the modal I moved it out of the viewport with a negative top.

But this ended up being buggy on mobile safari. When you scroll down the page a bit, then scroll back up, the modal is in view until the scroll stops.

So I added the additional step of pulling the dialog out of the viewport both top and left. This complicates the transition, in that the left transition needs to take 0s so the top transition is visible. But it was the only solution I found that worked.

Getting this to work consistently has been one of those exercises in finding a tweaking options until one combination works. But I still can’t explain why Safari is happy with percents in one case and pixels in another.