Swivelgames / PureModals

A "pure" javascript modal library for creating tooltips, interstitials, very basic and simple modals, and even complex step-based modal windows.
GNU General Public License v3.0
1 stars 0 forks source link

Modal positioning issue #1

Open cbengtson85 opened 10 years ago

cbengtson85 commented 10 years ago

If at least 1 modal is open, then opening a new modal will position it at the top of the html and not relative to the viewport/screen

Swivelgames commented 10 years ago

I was able to reproduce with whenever both modals have the modalIsScrollable option set to true. I'll take a look at it. Thanks a lot!

Swivelgames commented 10 years ago

If I remember correctly, I think this is because Pure Modals tries to capture and set the scrollTop of the documentElement even if another element is open. The method for this functionality should only execute if the class that it usually attaches to the documentElement is not yet attached.

Swivelgames commented 8 years ago

@cbengtson85 Are you still running into this issue?