Window focus

Hi,

this should be a simple one :slight_smile:

I have a Vaadin 7 application where modal windows are opened. Say I have the UI, a modal window opened and a new modal window opened over it, so I can only interact with the latest window. How can I set the focus on the covered window? I mean, bring it to the front and make it the only one interactable.

I have tried:

UI.getCurrent().setFocusedComponent(coveredWindow);

and even:

UI.getCurrent().removeWindow(coveredWindow);
UI.getCurrent().addWindow(coveredWindow);

but no luck!

I am not sure if it is a bug or I am doing something wrong.

Thanks in advance

Current versions of Vaadin do not support changing the order of active modal windows - there is only one (the last one in the stack) active at any time. Modal subwindows are designed so that only the last one is available for interaction, and this is reflected in the z-order, how the modality curtains are handled (blocking events to other parts of the application) etc.