Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
feat: esc to cancel editing (#532)
Zeng19985e069f79a2ad
diff --git a/web/src/components/MemoEditor.tsx b/web/src/components/MemoEditor.tsxindex 6c547c917..d9678c265 100644--- a/web/src/components/MemoEditor.tsx+++ b/web/src/components/MemoEditor.tsx@@ -99,8 +99,12 @@ const MemoEditor = () => {}, [editorState.editMemoId]);const handleKeyDown = (event: React.KeyboardEvent) => {- if (event.key === "Escape" && state.fullscreen) {- handleFullscreenBtnClick();+ if (event.key === "Escape") {+ if (state.fullscreen) {+ handleFullscreenBtnClick();+ } else {+ handleCancelEdit();+ }return;}if (event.key === "Tab") {