diff --git a/ui/src/components/InlineEntitySelector.tsx b/ui/src/components/InlineEntitySelector.tsx index 24991f9a..db453b7d 100644 --- a/ui/src/components/InlineEntitySelector.tsx +++ b/ui/src/components/InlineEntitySelector.tsx @@ -21,6 +21,8 @@ interface InlineEntitySelectorProps { className?: string; renderTriggerValue?: (option: InlineEntityOption | null) => ReactNode; renderOption?: (option: InlineEntityOption, isSelected: boolean) => ReactNode; + /** Skip the Portal so the popover stays in the DOM tree (fixes scroll inside Dialogs). */ + disablePortal?: boolean; } export const InlineEntitySelector = forwardRef( @@ -37,6 +39,7 @@ export const InlineEntitySelector = forwardRef { event.preventDefault(); // On touch devices, don't auto-focus the search input to avoid diff --git a/ui/src/components/NewIssueDialog.tsx b/ui/src/components/NewIssueDialog.tsx index fd3d004b..b396bbe4 100644 --- a/ui/src/components/NewIssueDialog.tsx +++ b/ui/src/components/NewIssueDialog.tsx @@ -649,6 +649,7 @@ export function NewIssueDialog() { value={assigneeId} options={assigneeOptions} placeholder="Assignee" + disablePortal noneLabel="No assignee" searchPlaceholder="Search assignees..." emptyMessage="No assignees found." @@ -683,6 +684,7 @@ export function NewIssueDialog() { value={projectId} options={projectOptions} placeholder="Project" + disablePortal noneLabel="No project" searchPlaceholder="Search projects..." emptyMessage="No projects found." @@ -738,6 +740,7 @@ export function NewIssueDialog() { value={assigneeModelOverride} options={modelOverrideOptions} placeholder="Default model" + disablePortal noneLabel="Default model" searchPlaceholder="Search models..." emptyMessage="No models found." diff --git a/ui/src/components/ui/popover.tsx b/ui/src/components/ui/popover.tsx index 103bec3e..c250a7d9 100644 --- a/ui/src/components/ui/popover.tsx +++ b/ui/src/components/ui/popover.tsx @@ -19,22 +19,23 @@ function PopoverContent({ className, align = "center", sideOffset = 4, + disablePortal = false, ...props -}: React.ComponentProps) { - return ( - - - +}: React.ComponentProps & { disablePortal?: boolean }) { + const content = ( + ) + if (disablePortal) return content + return {content} } function PopoverAnchor({