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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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
Expected behavior
Should check
hasChangesflag and prompt user before navigating away.Recommendation
Modify the Escape handler to call
handleCancel()which already has the unsaved changes check logic.