In my Application I need to open several Dialogs on top of each other in a kind of modal way and I’ve found this problem when I try to close more than one from the top of the stack.
All the objects on the screen become frozen, locked and everything seems disable, not a button clickable, etc.
Here a simple source to reproduce the problem.
Tested using Vaadin Flow 12.0.5 on Linux Ubuntu Chrome, Linux Ubuntu Firefox and Android 8 Chrome.
Is this a bug ?
Any hint for some workaround ?
public class MainView extends VerticalLayout {
public MainView() {
Button button = new Button("Open Dialog 0", e -> {
Dialog dialog0 = new Dialog();
dialog0.setCloseOnEsc(false);
dialog0.setCloseOnOutsideClick(false);
dialog0.add(new Label("Dialog 0"));
dialog0.add(new Button("Open Dialog 1", e0 -> {
Dialog dialog1 = new Dialog();
dialog1.setCloseOnEsc(false);
dialog1.setCloseOnOutsideClick(false);
dialog1.add(new Label("Dialog 1"));
dialog1.add(new Button("Open Dialog 2", e1 -> {
Dialog dialog2 = new Dialog();
dialog2.setCloseOnEsc(false);
dialog2.setCloseOnOutsideClick(false);
dialog2.add(new Label("Dialog 2"));
dialog2.add(new Button("Close Dialog 1 and 2", e2 -> {
dialog2.close();
dialog1.close();
}));
dialog2.open();
}));
dialog1.open();
}));
dialog0.open();
});
add(button);
}
}