prompt user when there are unsaved changes, #1692

This commit is contained in:
zadam
2021-02-27 23:39:02 +01:00
parent 02016ed031
commit 78e48095e6
5 changed files with 64 additions and 8 deletions

View File

@@ -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() {