fix: render code editor drawer above settings modal (#27648)

The ComfyUI workflow.json Edit drawer (CodeEditorModal -> Drawer) used
z-999, while the admin Settings dialog (Modal) uses z-9999. Since both
are appended to <body>, the drawer rendered behind the settings dialog
and appeared to open 'in the background' (#27647).

Add an optional zIndexClass prop to Drawer (default z-999, preserving
existing behaviour for all other callers) and pass z-99999 from
CodeEditorModal so the editor surfaces above any enclosing modal.
This commit is contained in:
Solaris-star authored and GitHub committed 2026-08-23 13:44:41 -04:00
1 parent bf3a58dbcd
commit 5ee7140b4c
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -5,6 +5,7 @@
export let show = false;
export let className = '';
export let zIndexClass = 'z-999';
export let onClose = () => {};
let modalElement = null;
@@ -57,7 +58,7 @@
{#if show}
<div
bind:this={modalElement}
class="modal fixed right-0 bottom-0 left-0 z-999 flex h-screen max-h-[100dvh] w-full justify-center overflow-hidden overscroll-contain bg-black/60"
class="modal fixed right-0 bottom-0 left-0 {zIndexClass} flex h-screen max-h-[100dvh] w-full justify-center overflow-hidden overscroll-contain bg-black/60"
in:fly={{ y: 100, duration: 100 }}
on:mousedown={() => {
show = false;