ResponsiveBP / Responsive

:iphone: A super lightweight HTML, Sass, CSS, and JavaScript framework for building responsive websites
http://responsivebp.com
MIT License
867 stars 135 forks source link

Modal race condition #77

Closed zyuhel closed 8 years ago

zyuhel commented 9 years ago

Sometimes if you hide and show modal window. Modal windows stops working until page restart.

Also if you run code to show modal while modal is shown, the modal window won't disappear.

zyuhel commented 9 years ago

It seems that issue is somewhere in Modal.prototype.overlay.

JimBobSquarePants commented 9 years ago

Thanks for raising this.

Could you perhaps supply some example code to demonstrate the issue? Also what version are you running?

zyuhel commented 9 years ago

I was using 4.1.0. Downloaded 4.1.1 issue still exists. Easiest way to duplicate is bind showing one modal on button in other modal window.

JimBobSquarePants commented 9 years ago

I'm really going to have to see a code example.

zyuhel commented 9 years ago

Yes of course. Look for example here - http://codepen.io/anon/pen/dYJZad It is example of calling modal within modal, after it modals won't work.

JimBobSquarePants commented 9 years ago

Thanks for that. Here's a working version containing nested modals. I'm using the data api to reduce the amount of core required.

http://codepen.io/anon/pen/PPEeQY

zyuhel commented 9 years ago

How can i repeat it using js? Or is it possible using only data api?