Skip to content

Commit 1157fae

Browse files
svenefftingeroboquat
authored andcommitted
[dashboard] non visible dialogs ignore keyevents
1 parent bd3c399 commit 1157fae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/dashboard/src/components/Modal.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ export default function Modal(props: {
3737
.catch(console.error);
3838
};
3939
const handler = (evt: KeyboardEvent) => {
40+
if (!props.visible) {
41+
return;
42+
}
4043
if (evt.defaultPrevented) {
4144
return;
4245
}

0 commit comments

Comments
 (0)