mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
fix(app): render modals above a fullscreen voice call (#1740)
This commit is contained in:
1 parent
a81b1abec7
commit
ae8e32d809
1 file changed
+10
-5
@@ -21,11 +21,16 @@ const isBackgroundModal = (element: React.ReactElement): boolean => {
|
||||
return BACKGROUND_MODAL_TYPES.some((type) => element.type === type);
|
||||
};
|
||||
const getCommandOwnerDocument = (): Document => getActivePortalHost()?.ownerDocument ?? document;
|
||||
const getPushOptions = (isBackground: boolean) => ({
|
||||
isBackground,
|
||||
forceMainWindow: isBackground,
|
||||
portalHost: isBackground ? null : getActivePortalHost(),
|
||||
});
|
||||
const getPushOptions = (isBackground: boolean) => {
|
||||
const activePortalHost = getActivePortalHost();
|
||||
const isPoppedOut = activePortalHost?.ownerDocument !== document;
|
||||
const forceMainWindow = isBackground && isPoppedOut;
|
||||
return {
|
||||
isBackground,
|
||||
forceMainWindow,
|
||||
portalHost: forceMainWindow ? null : activePortalHost,
|
||||
};
|
||||
};
|
||||
|
||||
export function modal(render: () => React.ReactElement): ModalRender {
|
||||
return render as ModalRender;
|
||||
|
||||
Reference in new issue
Block a user