Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(task): re add portal scoping for in-modal popovers (#728)

Seamus7690c5ee6fec
diff --git a/js/app/packages/app/component/split-layout/components/PopoverSplitRenderer.tsx b/js/app/packages/app/component/split-layout/components/PopoverSplitRenderer.tsx
index 1e7d32a433..a956050aa1 100644
--- a/js/app/packages/app/component/split-layout/components/PopoverSplitRenderer.tsx
+++ b/js/app/packages/app/component/split-layout/components/PopoverSplitRenderer.tsx
@@ -135,7 +135,7 @@ function PopoverSplitModal(props: {
}}
>
<DialogWrapper>
- <Dialog.Content>
+ <Dialog.Content class="portal-scope">
<ClippedPanel active tl ref={setPanelRef}>
<SplitPanelContext.Provider value={stubPanelContext}>
<Show when={props.popover.mount}>
diff --git a/js/app/packages/block-md/component/ComposeTask.tsx b/js/app/packages/block-md/component/ComposeTask.tsx
index 1ff599a15b..608cd8369f 100644
--- a/js/app/packages/block-md/component/ComposeTask.tsx
+++ b/js/app/packages/block-md/component/ComposeTask.tsx
@@ -1,4 +1,4 @@
-import { useSplitPanel } from '@app/component/split-layout/layoutUtils';
+import { useSplitPanelOrThrow } from '@app/component/split-layout/layoutUtils';
import { EntityIcon } from '@core/component/EntityIcon';
import { IconButton } from '@core/component/IconButton';
import { BlockLink } from '@core/component/LexicalMarkdown/component/core/BlockLink';
@@ -165,7 +165,7 @@ export interface ComposeTaskProps {
}
export function ComposeTask(props: ComposeTaskProps) {
- const splitPanel = useSplitPanel();
+ const splitPanel = useSplitPanelOrThrow();
const [title, setTitle] = createSignal(props.initialTitle ?? '');
const [content, setContent] = createSignal(props.initialContent ?? '');
const [bodyEditor, setBodyEditor] = createSignal<LexicalEditor>();
@@ -354,6 +354,7 @@ export function ComposeTask(props: ComposeTaskProps) {
}}
onFocusLeaveStart={(e) => editorFocusChange(e, -1)}
onFocusLeaveEnd={(e) => editorFocusChange(e, +1)}
+ portalScope={splitPanel.handle.isPopover() ? 'local' : 'block'}
/>
</div>