mirror of
https://github.com/zadam/trilium.git
synced 2025-11-04 20:36:13 +01:00
prompt user when there are unsaved changes, #1692
This commit is contained in:
@@ -27,6 +27,8 @@ export default class TabManager extends Component {
|
||||
openTabs: JSON.stringify(openTabs)
|
||||
});
|
||||
});
|
||||
|
||||
appContext.addBeforeUnloadListener(this);
|
||||
}
|
||||
|
||||
/** @type {TabContext[]} */
|
||||
@@ -329,6 +331,8 @@ export default class TabManager extends Component {
|
||||
|
||||
beforeUnloadEvent() {
|
||||
this.tabsUpdate.updateNowIfNecessary();
|
||||
|
||||
return true; // don't block closing the tab, this metadata is not that important
|
||||
}
|
||||
|
||||
openNewTabCommand() {
|
||||
|
||||
Reference in New Issue
Block a user