Problem with dialog div.overlay

General issues related to the use of Metro 4
Post Reply
Gabo
Posts: 2
Joined: Fri Sep 07, 2018 3:59 am
Status: Offline

Problem with dialog div.overlay

Post by Gabo » Fri Sep 07, 2018 4:02 am

Hello,

I have to use 2 dialogs, the first one call the second one, but when I close 2nd it removes the 2 div.overlay
How can I avoid it?

Thanks!

drodriguez
Posts: 44
Joined: Wed Apr 11, 2018 7:32 pm
Status: Offline

Post by drodriguez » Fri Sep 07, 2018 3:08 pm

I know it is not the best solution but work

the second dialogue open before first dialog close.... then, when first dialogue close remove the overlay for first and second dialogue..... if you put the second dialogue inside setTimeout it work, example

I don't know how @olton can fix it inside Metro, but happend with dialogues and activity overlays and any metro component with overlay div

onclick: function(){
setTimeout(function(){
Metro.dialog.create({
title: "Dialog 2",
........
},
10);

Example: https://codepen.io/drodriguez/pen/dqYydx

Similar issue in Github https://github.com/olton/Metro-UI-CSS/issues/1170

Gabo
Posts: 2
Joined: Fri Sep 07, 2018 3:59 am
Status: Offline

Post by Gabo » Fri Sep 07, 2018 8:03 pm

Thanks @drodriguez, it works.

drodriguez
Posts: 44
Joined: Wed Apr 11, 2018 7:32 pm
Status: Offline

Post by drodriguez » Fri Sep 07, 2018 8:33 pm

your welcome...

waiting for Olton suggest... he is the Metro Master :)

Post Reply