Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

refactor: enhance popover components with improved event handling

naveenkash7f8a23a5c6fa
diff --git a/apps/erp/app/modules/items/ui/Item/DemandForecastSourcesPopover.tsx b/apps/erp/app/modules/items/ui/Item/DemandForecastSourcesPopover.tsx
index c161f5a4f6..6ee4bed1dc 100644
--- a/apps/erp/app/modules/items/ui/Item/DemandForecastSourcesPopover.tsx
+++ b/apps/erp/app/modules/items/ui/Item/DemandForecastSourcesPopover.tsx
@@ -86,8 +86,11 @@ export function DemandForecastSourcesPopover({
return (
<Popover>
<PopoverTrigger asChild>{children}</PopoverTrigger>
- <PopoverContent className="w-xl max-h-112 overflow-y-auto">
- <div className="flex flex-col gap-2 p-2">
+ <PopoverContent
+ className="w-xl max-h-112 overflow-y-auto pointer-events-auto"
+ onWheel={(e) => e.stopPropagation()}
+ >
+ <div className="flex flex-col gap-2">
<div className="text-sm font-medium">
<Trans>Demand Forecast — Driven by</Trans>
</div>
diff --git a/apps/erp/app/modules/items/ui/Item/PlannedOrderDetailsPopover.tsx b/apps/erp/app/modules/items/ui/Item/PlannedOrderDetailsPopover.tsx
index a03beac200..081aa35e0f 100644
--- a/apps/erp/app/modules/items/ui/Item/PlannedOrderDetailsPopover.tsx
+++ b/apps/erp/app/modules/items/ui/Item/PlannedOrderDetailsPopover.tsx
@@ -45,8 +45,11 @@ export function PlannedOrderDetailsPopover({
return (
<Popover>
<PopoverTrigger asChild>{children}</PopoverTrigger>
- <PopoverContent className="w-md max-h-112 overflow-y-auto">
- <div className="flex flex-col gap-3 p-2">
+ <PopoverContent
+ className="w-md max-h-112 overflow-y-auto pointer-events-auto"
+ onWheel={(e) => e.stopPropagation()}
+ >
+ <div className="flex flex-col gap-3">
{/* Section A — Order facts */}
<div className="flex flex-col gap-1">
<div className="text-sm font-medium">