From 605dd419391ea9d1b11be1e19a61df66fc093b37 Mon Sep 17 00:00:00 2001 From: Gigi Date: Mon, 13 Oct 2025 23:46:50 +0200 Subject: [PATCH] fix(ui): render AddBookmarkModal using portal to fix z-index stacking Use React createPortal to render modal directly to document.body, bypassing the sidebar's stacking context (z-index: 1) which was preventing the modal from appearing above other elements --- src/components/AddBookmarkModal.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/AddBookmarkModal.tsx b/src/components/AddBookmarkModal.tsx index feaf3ace..26601351 100644 --- a/src/components/AddBookmarkModal.tsx +++ b/src/components/AddBookmarkModal.tsx @@ -1,4 +1,5 @@ import React, { useState, useEffect, useRef } from 'react' +import { createPortal } from 'react-dom' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faTimes, faSpinner } from '@fortawesome/free-solid-svg-icons' import IconButton from './IconButton' @@ -183,7 +184,7 @@ const AddBookmarkModal: React.FC = ({ onClose, onSave }) } } - return ( + return createPortal(
e.stopPropagation()}>
@@ -280,7 +281,8 @@ const AddBookmarkModal: React.FC = ({ onClose, onSave })
-
+ , + document.body ) }