Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fix issue for closing tag edit dialog with Esc: https://github.com/tagspaces/tagspaces/issues/1790 (#1792)

Stanimir271bdb864bd1
diff --git a/app/components/dialogs/EditEntryTagDialog.tsx b/app/components/dialogs/EditEntryTagDialog.tsx
index 447425bc2..c51994574 100644
--- a/app/components/dialogs/EditEntryTagDialog.tsx
+++ b/app/components/dialogs/EditEntryTagDialog.tsx
@@ -245,9 +245,9 @@ function EditEntryTagDialog(props: Props) {
event.preventDefault();
event.stopPropagation();
onConfirm();
- } else if (event.key === 'Escape') {
+ } /*else if (event.key === 'Escape') {
onClose();
- }
+ }*/
}}
>
{renderTitle()}
diff --git a/app/containers/MainPage.tsx b/app/containers/MainPage.tsx
index 8a076ddf0..d78f8d47f 100644
--- a/app/containers/MainPage.tsx
+++ b/app/containers/MainPage.tsx
@@ -147,7 +147,7 @@ interface Props {
resetProgress: () => void;
isEditTagDialogOpened: boolean;
keyBindings: any;
- toggleEditTagDialog: () => void;
+ toggleEditTagDialog: (tag: TS.Tag) => void;
setEntryFullWidth: (isFullWidth: boolean) => void;
loadParentDirectoryContent: () => void;
saveFile: () => void; // needed by electron-menus
@@ -666,7 +666,7 @@ function MainPage(props: Props) {
{props.isEditTagDialogOpened && (
<EditEntryTagDialogAsync
open={props.isEditTagDialogOpened}
- onClose={toggleEditTagDialog}
+ onClose={() => toggleEditTagDialog(undefined)}
/>
)}
{props.isOpenLinkDialogOpened && (
@@ -765,7 +765,7 @@ function MainPage(props: Props) {
.react-split .split-container {
--react-split-splitter:3px !important;
- }
+ }
`}
</style>
{props.isDesktopMode || (AppConfig.isAmplify && !props.user) ? (