mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-26 23:44:48 -06:00
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:
@@ -26,7 +26,7 @@
|
||||
});
|
||||
</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=" 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 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;
|
||||
|
||||
Reference in New Issue
Block a user