winbox icon indicating copy to clipboard operation
winbox copied to clipboard

Problem with showing a modal window while another window is focused

Open mossaiby opened this issue 2 years ago • 4 comments

Hi,

If a modal window is shown though clicking a button in another window, the modal window is not focused and the other window is shown above the backdrop, even though I call focus() on the modal window. When the modal window gets focus via clicking, the other window goes behind the backdrop and everything becomes OK. A workaround is doing that in a setTimeout(() => modalWindow.show().focus(), 0), but of course this is not desirable.

Edit: This is not specific to modal windows.

Also, there is no way to blur a window... maybe adding a blur() method would be nice.

TIA

mossaiby avatar Sep 02 '21 22:09 mossaiby

Same problem here

AlexandreBourrieau avatar Dec 12 '21 17:12 AlexandreBourrieau

This should be fixed now. Please try again.

ts-thomas avatar Aug 20 '22 12:08 ts-thomas

Call with modal:true don't display modal window (in result div: display:none) image

mkorban avatar Aug 26 '22 07:08 mkorban

For me there is a conflict if you are also using bootstrap 4/5. Setting modal:true in the config section has the following effect:

  • winbox .modal class is overridden by the bootstrap .modal class.

If I rename all instances of "modal" in the winbox .js and .css files to something else, ie 'modals' then I see the window pop correctly as a shown on the examples site.

jokertrm avatar May 22 '23 18:05 jokertrm