Dialog method setCloseOnOutsideClick doesn't work - Vaadin 14.4.4

I use a modal dialog in 14.4.4 and I set

setCloseOnEsc(false);

setCloseOnOutsideClick(false);

But theese methods don’t work and the Dialog still closes if I click outside or esc.

Is it a bug ?

Did I something wrong ?

Tks

Hi,

I’ve just tried a simple view with a dialog in Vaadin 14.4.4 and it seems ok:

    public DialogView() {
        Button button = new Button("open dialog", e -> {
            Dialog dialog = new Dialog();
            VerticalLayout verticalLayout = new VerticalLayout(new Div(), new Button("close", event -> dialog.close()));
            dialog.add(verticalLayout);
            dialog.setModal(false);
            dialog.setCloseOnEsc(false);
            dialog.setCloseOnOutsideClick(false);
            dialog.open();
        });
        add(button);
    }

Can you reproduce your problem in a sample project?

Tks for Your help.
Now it works.
The only difference was I did the setCloseOnOutsideClick in the constructor of a class extending Dialog and it didn’t work.
Doing it outside it works.
Tks again.