Skip to content

Commit 0ce35cd

Browse files
authored
fix: switch app layout to prevent sidebar buttons auto focus (#2379)
* fix: prevent focus Signed-off-by: Adam Setch <[email protected]> * fix: prevent focus Signed-off-by: Adam Setch <[email protected]> * fix app layout dom order Signed-off-by: Adam Setch <[email protected]> --------- Signed-off-by: Adam Setch <[email protected]>
1 parent fb92cf1 commit 0ce35cd

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

src/renderer/components/layout/AppLayout.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ interface IAppLayout {
1313
export const AppLayout: FC<IAppLayout> = ({ children }) => {
1414
return (
1515
<div className="flex flex-col min-h-screen bg-gitify-background">
16-
<Sidebar />
17-
{/* Content area with left padding to make space for the sidebar */}
16+
{/* Content first in DOM so initial focus won't land on sidebar buttons */}
1817
<div className="flex-1 pl-sidebar">{children}</div>
18+
19+
<Sidebar />
1920
</div>
2021
);
2122
};

src/renderer/components/layout/__snapshots__/AppLayout.test.tsx.snap

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)