forked from docmost/docmost
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove space tree delete shortcut key (docmost#394)
- Loading branch information
1 parent
46d92fb
commit fa3c8a0
Showing
3 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,5 +80,10 @@ | |
"apps/*", | ||
"packages/*" | ||
] | ||
}, | ||
"pnpm": { | ||
"patchedDependencies": { | ||
"[email protected]": "patches/[email protected]" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
diff --git a/dist/module/components/default-container.js b/dist/module/components/default-container.js | ||
index 47724f59b482454fe3144dbb98bd16d3df6a9c17..2285e35ea0073a773b7b74e22758056fd3514c1a 100644 | ||
--- a/dist/module/components/default-container.js | ||
+++ b/dist/module/components/default-container.js | ||
@@ -34,28 +34,6 @@ export function DefaultContainer() { | ||
return; | ||
} | ||
if (e.key === "Backspace") { | ||
- if (!tree.props.onDelete) | ||
- return; | ||
- const ids = Array.from(tree.selectedIds); | ||
- if (ids.length > 1) { | ||
- let nextFocus = tree.mostRecentNode; | ||
- while (nextFocus && nextFocus.isSelected) { | ||
- nextFocus = nextFocus.nextSibling; | ||
- } | ||
- if (!nextFocus) | ||
- nextFocus = tree.lastNode; | ||
- tree.focus(nextFocus, { scroll: false }); | ||
- tree.delete(Array.from(ids)); | ||
- } | ||
- else { | ||
- const node = tree.focusedNode; | ||
- if (node) { | ||
- const sib = node.nextSibling; | ||
- const parent = node.parent; | ||
- tree.focus(sib || parent, { scroll: false }); | ||
- tree.delete(node); | ||
- } | ||
- } | ||
return; | ||
} | ||
if (e.key === "Tab" && !e.shiftKey) { |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.