chore(quick_edit): address requested changes

This commit is contained in:
Elian Doran 2025-11-22 21:37:41 +02:00
parent 26f7264f3c
commit 5edc4abfb4
No known key found for this signature in database

View File

@ -29,6 +29,11 @@ export default function PopupEditor() {
setShown(true); setShown(true);
}); });
// Add a global class to be able to handle issues with z-index due to rendering in a popup.
useEffect(() => {
document.body.classList.toggle("popup-editor-open", shown);
}, [shown]);
return ( return (
<NoteContextContext.Provider value={noteContext}> <NoteContextContext.Provider value={noteContext}>
<DialogWrapper> <DialogWrapper>
@ -52,9 +57,8 @@ export default function PopupEditor() {
} }
export function DialogWrapper({ children }: { children: ComponentChildren }) { export function DialogWrapper({ children }: { children: ComponentChildren }) {
const { note, ntxId } = useNoteContext(); const { note } = useNoteContext();
const wrapperRef = useRef<HTMLDivElement>(null); const wrapperRef = useRef<HTMLDivElement>(null);
const colorClass = note?.getColorClass();
const [ hasTint, setHasTint ] = useState(false); const [ hasTint, setHasTint ] = useState(false);
// Apply the tinted-dialog class only if the custom color CSS class specifies a hue // Apply the tinted-dialog class only if the custom color CSS class specifies a hue