-
Suggestion
-
Resolution: Unresolved
-
None
When switching to the page editor or to another page, Confluence does not trigger the beforeunload handler of our iframe, so no warning is shown if there are unsaved database changes. I have reported this here, but it is unlikely that Atlassian will do anything about it.
As an alternative, we could persist the current database draft in the browser local storage. This would mean that when navigating away and back, the unsaved changes would still be there.
The draft should probably be persisted for each location (macro instance (we should make sure that the macro ID stays constant when editing the page), database view, entry view, but not entry dialog) separately. Live synchronization would be needed in case the same location is opened in multiple tabs at the same time. Storing the draft only once per database would result in confusion when the database is shown as different views in different places and a save button would appear when an entry that is not part of the view was edited somewhere else.