A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: do not deselect items if menu is closed with esc key
thecodrr2cff6212d58d
diff --git a/apps/web/src/components/global-menu-wrapper/index.js b/apps/web/src/components/global-menu-wrapper/index.jsindex c4d8f9256..1aebd83ae 100644--- a/apps/web/src/components/global-menu-wrapper/index.js+++ b/apps/web/src/components/global-menu-wrapper/index.js@@ -37,6 +37,13 @@ function GlobalMenuWrapper() {contentElement={(props, children) => (<Box{...props}+ onKeyDown={(e) => {+ if (props.onKeyDown) props.onKeyDown(e);+ if (e.key === "Escape") {+ e.stopPropagation();+ e.preventDefault();+ }+ }}style={{}}sx={{top: 0,diff --git a/apps/web/src/components/list-container/index.js b/apps/web/src/components/list-container/index.jsindex 9e66158c2..cf1387bd7 100644--- a/apps/web/src/components/list-container/index.js+++ b/apps/web/src/components/list-container/index.js@@ -56,12 +56,11 @@ function ListContainer(props) {computeItemKey={(index) => items[index].id || items[index].title}defaultItemHeight={profile.estimatedItemHeight}totalCount={items.length}- onKeyUp={(e) => {+ onKeyDown={(e) => {if (e.code === "Escape") {selectionStore.toggleSelectionMode(false);+ return;}- }}- onKeyDown={(e) => {if (e.code === "KeyA" && e.ctrlKey) {e.preventDefault();e.stopPropagation();