From f338ae0ae473e148c8420eca0a84ddd4c0769dec Mon Sep 17 00:00:00 2001 From: Gabriel Borlea Date: Tue, 7 Mar 2023 13:35:04 +0200 Subject: [PATCH] add constant for zIndex --- react/features/toolbox/components/web/DialogPortal.ts | 3 ++- react/features/toolbox/constants.ts | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/react/features/toolbox/components/web/DialogPortal.ts b/react/features/toolbox/components/web/DialogPortal.ts index 0278cf3cb..91f3bb21f 100644 --- a/react/features/toolbox/components/web/DialogPortal.ts +++ b/react/features/toolbox/components/web/DialogPortal.ts @@ -3,6 +3,7 @@ import ReactDOM from 'react-dom'; import { useSelector } from 'react-redux'; import { IReduxState } from '../../../app/types'; +import { ZINDEX_DIALOG_PORTAL } from '../../constants'; type Props = { @@ -65,7 +66,7 @@ function DialogPortal({ children, className, style, getRef, setSize }: Props) { useEffect(() => { if (portalTarget && getRef) { getRef(portalTarget); - portalTarget.style.zIndex = '300'; + portalTarget.style.zIndex = `${ZINDEX_DIALOG_PORTAL}`; } }, [ portalTarget ]); diff --git a/react/features/toolbox/constants.ts b/react/features/toolbox/constants.ts index 3d35ae9b1..8fff98bcc 100644 --- a/react/features/toolbox/constants.ts +++ b/react/features/toolbox/constants.ts @@ -38,3 +38,6 @@ export const NOTIFY_CLICK_MODE = { ONLY_NOTIFY: 'ONLY_NOTIFY', PREVENT_AND_NOTIFY: 'PREVENT_AND_NOTIFY' }; + +// Around 300 to be displayed above components like chat +export const ZINDEX_DIALOG_PORTAL = 300;