From 11c009bdbf653ff5d7c7f61fdd17bc3fa06c6db6 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Mon, 11 Apr 2022 08:08:13 -0700 Subject: [PATCH] fix: Don't create new document when opening browser window with cmd+n --- app/components/AuthenticatedLayout.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/components/AuthenticatedLayout.tsx b/app/components/AuthenticatedLayout.tsx index 50d9c1c96..a591804bf 100644 --- a/app/components/AuthenticatedLayout.tsx +++ b/app/components/AuthenticatedLayout.tsx @@ -51,7 +51,11 @@ class AuthenticatedLayout extends React.Component { } }; - goToNewDocument = () => { + goToNewDocument = (event: KeyboardEvent) => { + if (event.metaKey || event.altKey) { + return; + } + const { activeCollectionId } = this.props.ui; if (!activeCollectionId) { return;