Skip to content

Commit 051eca7

Browse files
committed
fix(ui-top-nav-bar): fix focus ring not showing when closing a dropdown
The issue was likely that TopNavBarItem did not enter the focused state because its rerendered a lot. This fix does not use the onFocus React event rather sets withFocusoutline to undefined so the focus ring is added via CSS Fixes INSTUI-4587
1 parent 6e42d1e commit 051eca7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/ui-color-utils/tsconfig.build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"references": [
1010
{
1111
"path": "../ui-babel-preset/tsconfig.build.json"
12-
},
12+
}
1313
]
1414
}

packages/ui-top-nav-bar/src/TopNavBar/TopNavBarItem/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ class TopNavBarItem extends Component<TopNavBarItemProps, TopNavBarItemState> {
435435
this.handleItemRef(e as HTMLButtonElement | HTMLLinkElement)
436436
},
437437
withFocusOutline:
438-
withFocusOutline || this.hasOpenPopover || this.state.isFocused
438+
withFocusOutline || this.hasOpenPopover ? true : undefined
439439
}
440440
}
441441

0 commit comments

Comments
 (0)