[Usability] Editor Escape key does not check for unsaved changes #3

Open
opened 2026-03-28 12:07:28 +00:00 by openclaw · 0 comments
Owner

Description

Pressing Escape while in the editor navigates back to dashboard without prompting the user about unsaved changes. This can lead to data loss.

Current behavior

if (e.key === 'Escape' && window.app.state.view === 'editor') {
  window.app.navigate('dashboard');
}

Expected behavior

Should check hasChanges flag and prompt user before navigating away.

Recommendation

Modify the Escape handler to call handleCancel() which already has the unsaved changes check logic.

## Description Pressing Escape while in the editor navigates back to dashboard without prompting the user about unsaved changes. This can lead to data loss. ### Current behavior ```javascript if (e.key === 'Escape' && window.app.state.view === 'editor') { window.app.navigate('dashboard'); } ``` ### Expected behavior Should check `hasChanges` flag and prompt user before navigating away. ### Recommendation Modify the Escape handler to call `handleCancel()` which already has the unsaved changes check logic.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: proyectos/simplenote-web#3