Skip to content

Commit db162dc

Browse files
fix(clerk-js): Remove navbar icon shift in safari (#5887)
1 parent 36c6f8f commit db162dc

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

.changeset/stupid-gifts-juggle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/clerk-js': patch
3+
---
4+
5+
Fixes issue in Safari where navigating between profile tabs caused the navbar icons to shift unexpectedly.

packages/clerk-js/src/ui/elements/Navbar.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,11 @@ const NavButton = (props: NavButtonProps) => {
290290
elementDescriptor={iconElementDescriptor}
291291
elementId={iconElementId}
292292
icon={icon}
293-
sx={{ opacity: isActive ? 1 : 0.7 }}
293+
sx={{
294+
opacity: isActive ? 1 : 0.7,
295+
// Fixes a bug in Safari where the icon shifts when navigating between routes.
296+
transform: 'translateZ(0)',
297+
}}
294298
/>
295299
{children}
296300
</Button>

0 commit comments

Comments
 (0)