Skip to content

Commit 21b3d4e

Browse files
committed
prevent flash on row click
1 parent 21ad6b4 commit 21b3d4e

File tree

1 file changed

+5
-0
lines changed
  • packages/ui/src/elements/TreeView/NestedSectionsTable/Row

1 file changed

+5
-0
lines changed

packages/ui/src/elements/TreeView/NestedSectionsTable/Row/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ export const NestedSectionsTableRow: React.FC<DivTableRowProps> = ({
146146
}
147147
: undefined
148148
}
149+
onMouseDown={(e) => {
150+
// Prevent focus on mouse click to avoid the flash of focused state
151+
// Focus should only be triggered via keyboard navigation
152+
e.preventDefault()
153+
}}
149154
ref={rowRef}
150155
role="button"
151156
tabIndex={hasSelectedAncestor ? -1 : 0}

0 commit comments

Comments
 (0)