LPS-48058 On iOS devices Sign In iframe can allow zooming out far beyond...

... the page

Hey @jonmak

Here is an update for LPS-48058. The issue arises when you position a modal window absolute (which we are doing for iOS devices for good reason). What happens is when you open a dialog window for the second time, it calculates the viewportRegion after the modal is displayed, which throws of the calculated region to be much larger than it's supposed to be.

With these changes it only grabs the viewport region the first time and caches it, so it doesn't have to recalculate the region every time. The reason I did it this way, is because it seems like the theme developer should be able to position a modal absolute without throwing the alignment off, even if we didn't have this iOS workaround in place that uncovered the issue.

Let me know if you have any questions.