Currently, I have an add-on that requires the user to save the changes that they make in the options manually. The add-on options are currently being run through Firefox’s add-on manager rather than opening in a new tab and I’d prefer to keep it that way, if possible.
What I would like is to get the “Are you sure you want to leave the unsaved changes” popup to appear if the user tries to close or navigate away from the options page without the changes saved. This works with a beforeunload listener if I open the options in a tab, but not if it’s opened in Firefox’s add-on manager.
Is there a way to get this functionality to work when the options open_in_tab value is set to false or am I forced to open the options in a tab instead?