Skip to content

armgit / memos

Public Imported from GitHub
0

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.

fix: prevent CTRL+Enter save while editor is loading content (#5581)

Steven6bb383a4a51a
diff --git a/web/src/components/MemoEditor/services/validationService.ts b/web/src/components/MemoEditor/services/validationService.ts
index 1f2ac06ba..139348ab1 100644
--- a/web/src/components/MemoEditor/services/validationService.ts
+++ b/web/src/components/MemoEditor/services/validationService.ts
@@ -7,6 +7,11 @@ export interface ValidationResult {
export const validationService = {
canSave(state: EditorState): ValidationResult {
+ // Cannot save while loading initial content
+ if (state.ui.isLoading.loading) {
+ return { valid: false, reason: "Loading memo content" };
+ }
+
// Must have content, attachment, or local file
if (!state.content.trim() && state.metadata.attachments.length === 0 && state.localFiles.length === 0) {
return { valid: false, reason: "Content, attachment, or file required" };