From 5f3250b1757db2c1495b298fd7512e1716f67da6 Mon Sep 17 00:00:00 2001 From: Chewbacca Date: Wed, 12 Apr 2023 15:04:42 -0400 Subject: [PATCH] Resolve bug with toast during modal --- app/soapbox/components/modal-root.tsx | 4 +++- app/soapbox/containers/soapbox.tsx | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/soapbox/components/modal-root.tsx b/app/soapbox/components/modal-root.tsx index 84c1252c9..2358a951f 100644 --- a/app/soapbox/components/modal-root.tsx +++ b/app/soapbox/components/modal-root.tsx @@ -181,7 +181,9 @@ const ModalRoot: React.FC = ({ children, onCancel, onClose, type }) }; const getSiblings = () => { - return Array(...(ref.current!.parentElement!.childNodes as any as ChildNode[])).filter(node => node !== ref.current); + return Array(...(ref.current!.parentElement!.childNodes as any as ChildNode[])) + .filter(node => (node as HTMLDivElement).id !== 'toaster') + .filter(node => node !== ref.current); }; useEffect(() => { diff --git a/app/soapbox/containers/soapbox.tsx b/app/soapbox/containers/soapbox.tsx index fb6ce9481..75134b00d 100644 --- a/app/soapbox/containers/soapbox.tsx +++ b/app/soapbox/containers/soapbox.tsx @@ -191,7 +191,14 @@ const SoapboxMount = () => { - + +
+ +