@Route(value = "overlay", layout = MainLayout.class)
@AnonymousAllowed
public class OverlayView extends VerticalLayout {
@Override
protected void onAttach(AttachEvent attachEvent) {
super.onAttach(attachEvent);
Dialog dialog = new Dialog("The Dialog");
dialog.setCloseOnOutsideClick(true);
dialog.setCloseOnEsc(true);
dialog.add(new Div("Text nr 1"));
dialog.open();
}
}
if you are running using HotswapAgent and edit the div text to "Text nr 2", then a dialog with "Text nr 1" remains on screen and a dialog with "Text nr 2" is not added at all. If you manually refresh the page, the dialog with "Text nr 2" is shown
Description of the bug
Given
if you are running using HotswapAgent and edit the div text to "Text nr 2", then a dialog with "Text nr 1" remains on screen and a dialog with "Text nr 2" is not added at all. If you manually refresh the page, the dialog with "Text nr 2" is shown
Expected behavior
The old dialog is closed and the new one opened
Minimal reproducible example
as above
Versions