vaadin / flow

Vaadin Flow is a Java framework binding Vaadin web components to Java. This is part of Vaadin 10+.
Apache License 2.0
619 stars 167 forks source link

Dialog is not updated when doing hotswap #20473

Open Artur- opened 2 days ago

Artur- commented 2 days ago

Description of the bug

Given

@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

Expected behavior

The old dialog is closed and the new one opened

Minimal reproducible example

as above

Versions