diff --git a/frontend/app.js b/frontend/app.js index e4136ed..16c0fe7 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -2098,6 +2098,9 @@ function noteApp() { } this.expandedFolders.add(folderPath); await this.loadNotes(); + + // Navigate to the newly created folder on the homepage + this.goToHomepageFolder(folderPath); } else { ErrorHandler.handle('create folder', new Error('Server returned error')); } @@ -3397,6 +3400,12 @@ function noteApp() { goToHomepageFolder(folderPath) { this.selectedHomepageFolder = folderPath || ''; + // Clear editor state to show landing page + this.currentNote = ''; + this.currentNoteName = ''; + this.noteContent = ''; + this.currentImage = ''; + // Invalidate cache to force recalculation this._homepageCache = { folderPath: null, diff --git a/frontend/index.html b/frontend/index.html index bd7aae5..bf35062 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1236,10 +1236,24 @@