Window Bring to top

Hi. I’ve a simple question. How can i bring to top a window if i’ve many window open on screen?
For example, if I have two overlapping windows, how can I move one window over the other without click over them? Is there a function for this?

Tks in advance

Emilio

Calling win.show() method to the opened window will bring it to the top.

Hi, not work. See the snipped https://snippet.dhtmlx.com/lzrxnujg

tks in advance

Emilio

Working well with the latest build:
https://snippet.dhtmlx.com/eemq0gd4
Please, try to use the latest version of the dhtmlxSuite.

ok, but this recharge the content of window and this is a problem. There are not an api only for change focus?

tks in advance

Emilio

There is no other solution.
Also, please, note that the content of the window is not reloading in this case. You may check it typing something in the input placed inside the window and swapping the windows:
https://snippet.dhtmlx.com/mk1lspna

1 Like

Hi, I’m bringing this up again because I see there’s still no function in Suite 9 that solves the problem. The “show” function has the limitation that if there’s an Iframe in the window, when i use “show” it reloads, which is a major limitation. The same snippet from 5 years ago (DHTMLX Snippet Tool) highlights the problem. The frame reloads. So, in the meantime, is there a parameter that can be changed to bring the window to the top also not using “show”?

Hello @Spino,

It really seems as lack in built-in methods. I already sent it to the dev team, and they will consider adding additional method in one of future releases. I will notify you on any updates.

As a workaround, you can manually change window classes by adding the dhx_popup--window_active class to the window, that you want move to the top, and remove it from the current top window, like follows:

dhxWindow.attachHTML(windowHtml);
dhxWindow1.attachHTML(windowHtml);

dhxWindow.show();
dhxWindow1.show();

function show(activeView, lastView) {
    activeView._popup.classList.add("dhx_popup--window_active");
    lastView._popup.classList.remove("dhx_popup--window_active")
}

...
show(dhxWindow, dhxWindow1)
 

Here is an example:
https://snippet.dhtmlx.com/wtaxm643

Kind regards,