Skip to content

Commit c5c8cfb

Browse files
committed
Resolved lint/formatting errors
1 parent 10e08f2 commit c5c8cfb

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

apps/desktop/src/OpenWithDialog.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default function OpenWithDialog({
4646
if (onCloseProp) onCloseProp();
4747
else closeDialog();
4848
}, [closeDialog, onCloseProp]);
49-
49+
5050
useEffect(() => {
5151
if (!open) return undefined;
5252

@@ -57,6 +57,11 @@ export default function OpenWithDialog({
5757
}
5858
};
5959

60+
const first = document.querySelector<HTMLInputElement>(
61+
'input[name="owd-browser"]'
62+
);
63+
first?.focus();
64+
6065
window.addEventListener('keydown', handleKeyDown);
6166
return () => {
6267
window.removeEventListener('keydown', handleKeyDown);
@@ -81,14 +86,6 @@ export default function OpenWithDialog({
8186
}
8287
};
8388

84-
useEffect(() => {
85-
if (!open) return;
86-
const first = document.querySelector<HTMLInputElement>(
87-
'input[name="owd-browser"]'
88-
);
89-
first?.focus();
90-
}, [open]);
91-
9289
return (
9390
<div className='fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur p-4 sm:p-6'>
9491
<div

apps/desktop/src/tests/OpenWithDialog.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ describe('OpenWithDialog (accessibility + keyboard)', () => {
5151
<OpenWithDialog open={true} browsers={browsers} onChoose={() => {}} />
5252
);
5353
const results = await axe(container);
54-
5554
expect(results.violations).toHaveLength(0);
5655
});
5756
});

0 commit comments

Comments
 (0)