Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

fix(builder): branch label dots, drag-select and add button hover in Safari (#16611)

Abdulec79605127a0
diff --git a/packages/web/src/app/builder/flow-canvas/nodes/big-add-button-node.tsx b/packages/web/src/app/builder/flow-canvas/nodes/big-add-button-node.tsx
index 299b5d23d79..8b68fc71f6b 100644
--- a/packages/web/src/app/builder/flow-canvas/nodes/big-add-button-node.tsx
+++ b/packages/web/src/app/builder/flow-canvas/nodes/big-add-button-node.tsx
@@ -93,7 +93,14 @@ const ApBigAddButtonCanvasNode = React.memo(
<span>
<Button
variant="ghost"
- className="w-full h-full flex items-center enabled:hover:bg-gray-4 rounded-xl border-gray-6 border-solid border"
+ className={cn(
+ 'w-full h-full flex items-center rounded-xl border-gray-6 border-solid border',
+ {
+ 'enabled:hover:bg-gray-4':
+ !isPieceSelectorOpened,
+ 'hover:bg-transparent': isPieceSelectorOpened,
+ },
+ )}
>
<Plus
className={cn('w-6 h-6 text-gray-12 ', {
diff --git a/packages/web/src/styles.css b/packages/web/src/styles.css
index 83cb2d8f15d..fd43b1a55bd 100644
--- a/packages/web/src/styles.css
+++ b/packages/web/src/styles.css
@@ -910,6 +910,20 @@
cursor: default !important;
}
+ /* React Flow sets position: absolute on every svg in the edges layer, including
+ icons inside edge labels (foreignObject). Safari then draws those icons outside
+ their box, e.g. the menu dots on router branch labels disappear. */
+ .react-flow__edges foreignObject svg {
+ position: static !important;
+ }
+
+ /* Safari starts a native text selection while drag-selecting on the canvas and
+ paints large blue boxes over steps and edges. Chrome does not. */
+ .react-flow__pane {
+ -webkit-user-select: none;
+ user-select: none;
+ }
+
.react-flow__edge.selectable > path {
/* If necessary, add !important to the rule */
pointer-events: none !important;