Skip to content

Commit

Permalink
toolbar: Hide the tooltip when the menu is open
Browse files Browse the repository at this point in the history
  • Loading branch information
garrett authored and martinpitt committed Jul 17, 2024
1 parent fef0f34 commit 94d07c0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,8 @@
.pf-v5-c-menu-toggle > .pf-v5-c-menu-toggle__controls {
padding-inline-start: 0;
}

.tooltip-hidden {
visibility: hidden;
pointer-events: none;
}
6 changes: 5 additions & 1 deletion src/files-breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ function BookmarkButton({ path }: { path: string[] }) {
onOpenChange={(isOpen: boolean) => setIsOpen(isOpen)}
onSelect={handleSelect}
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
<Tooltip content={_("Bookmarks")} position={TooltipPosition.bottom}>
<Tooltip
content={_("Bookmarks")}
position={TooltipPosition.bottom}
className={isOpen ? 'tooltip-hidden' : ''}
>
<MenuToggle
id="bookmark-btn"
variant="secondary"
Expand Down

0 comments on commit 94d07c0

Please sign in to comment.