Foundation-sites: [Reveal] Issues with Multiple Reveal Modals

Created on 14 Dec 2016  路  6Comments  路  Source: foundation/foundation-sites

How can we reproduce this bug?

Open multiple reveal modals so one is displayed in front of the other.

Case 1: Click outside both modals and press the escape key. Both modals are closed instead of just one.
Case 2: After the page loads, press the escape key to close the first modal. Then click outside the second modal and press escape. Nothing happens.
Case 3: Close the first modal.

What did you expect to happen?

Case 1: I expected only the top modal to close.
Case 2: I expected the second modal to close.
Case 3: I expected the is-reveal-open class to remain on the body.

What happened instead?

Case 1: Both modals were closed.
Case 2: The second modal did not close. The keydown.zf.reveal event was removed from the window object after the first modal was closed.
Case 3: The is-reveal-open class was removed from the body.

Test case:

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

Reveal javascript 馃悰bug

All 6 comments

I looked from where the problems come from but I do not know the Reveal and ZF Js enough to solve this issue.

Codepen with ZF 6.3.0

@brettsmason I will need your help on this ;)

@brettsmason Would you have some time to take a look at this issue ?

@ncoden sorry missed this. I'll try and take a look later, though it may require someone with more JS skills

Ah sorry, I had you in mind for the Reveal, I probably mistaken it for Off Canvas. 馃

Just had a quick look - I think this will require a JS person, sorry 馃槃
Yeah could probably of helped it was off canvas 馃槈

@kball do you still plan to work on a solution?

Was this page helpful?
0 / 5 - 0 ratings