Popups - dialogs appearing below the popped out widget
Closed this issue · 2 comments
jzbuchalski commented
Describe the bug
If a widget is popped out (on a single monitor), any dialog shown from that popped out widget will appear below the popout.
To Reproduce
No response
Expected Behavior
Should appear above the popped out widget.
Screenshots
Desktop (please complete the applicable information)
No response
Additional context
No response
ignas-k commented
I assume your widget uses UiFramework.dialogs.modal.open
which is an old API therefore it is slightly problematic. By default it renders dialogs in the main window which is what is happening in your case. Unfortunately, there isn't anything we can do to fix this, however, you can fix this issue yourselves:
- The best way to solve this would be to use
Dialog
from iTwinUI instead of theUiFramework.dialogs.modal.open
function. This API was created before the iTwinUI dialogs existed so they are the new and preferred way to render dialogs. - If you do not want to use the iTwinUI
Dialog
, you can pass aparentDocument
property when callingUiFramework.dialogs.modal.open
e.g. you can create a ref for the button that opens the dialog and pass theref.current.ownerDocument
value as the third property inUiFramework.dialogs.modal.open
.
jzbuchalski commented
Excellent, we will give these suggestions a try.