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:
1 parent
bf3a58dbcd
commit
5ee7140b4c
2 files changed
+3
-2
No files matched your search
@@ -26,7 +26,7 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Drawer bind:show className="h-full">
|
<Drawer bind:show className="h-full" zIndexClass="z-99999">
|
||||||
<div class="flex h-full flex-col">
|
<div class="flex h-full flex-col">
|
||||||
<div
|
<div
|
||||||
class=" sticky top-0 z-30 flex justify-between bg-white px-4.5 pt-3 pb-3 dark:bg-gray-900 dark:text-gray-100"
|
class=" sticky top-0 z-30 flex justify-between bg-white px-4.5 pt-3 pb-3 dark:bg-gray-900 dark:text-gray-100"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
export let show = false;
|
export let show = false;
|
||||||
export let className = '';
|
export let className = '';
|
||||||
|
export let zIndexClass = 'z-999';
|
||||||
export let onClose = () => {};
|
export let onClose = () => {};
|
||||||
|
|
||||||
let modalElement = null;
|
let modalElement = null;
|
||||||
@@ -57,7 +58,7 @@
|
|||||||
{#if show}
|
{#if show}
|
||||||
<div
|
<div
|
||||||
bind:this={modalElement}
|
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 }}
|
in:fly={{ y: 100, duration: 100 }}
|
||||||
on:mousedown={() => {
|
on:mousedown={() => {
|
||||||
show = false;
|
show = false;
|
||||||
|
|||||||
Reference in new issue
Block a user