winbox
winbox copied to clipboard
Problem with showing a modal window while another window is focused
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
Same problem here
This should be fixed now. Please try again.
Call with modal:true
don't display modal window (in result div: display:none
)
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.