Details
-
Suggestion
-
Resolution: Unresolved
-
None
Description
It is common practice to register for the beforeunload event in order to perform some processing prior to the window being discarded. The most common example involves saving user entered information. Unfortunately, however, the event is not fired within a macro when the user navigates away using the Confluence UI. This is likely due to Confluence's single page architecture.
It is suggested that a new Javascript API method be provided: AP.confluence.onMacroClosingEvent()
If registered, Confluence would call this method prior to closing the macro. To prevent apps from inadvertently causing usability issues, a timeout can be implemented to ensure unresponsive apps do not block the user's navigation.