Skip to content

Commit

Permalink
fix: port code
Browse files Browse the repository at this point in the history
  • Loading branch information
potts99 committed Nov 3, 2024
1 parent 5e2ab64 commit 5fdb6cc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions apps/client/@/shadcn/components/app-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {

function handleKeyPress(event: any) {
const pathname = location.pathname;

// Check for Ctrl or Meta key to bypass the shortcut handler
if (event.ctrlKey || event.metaKey) {
return; // Don't override browser shortcuts
}

if (
document.activeElement!.tagName !== "INPUT" &&
document.activeElement!.tagName !== "TEXTAREA" &&
Expand Down Expand Up @@ -153,7 +153,6 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
};
}, [handleKeyPress, location]);


return (
<Sidebar collapsible="icon" {...props}>
<SidebarHeader>
Expand Down

0 comments on commit 5fdb6cc

Please sign in to comment.