I’m working on an addon that I would like to support export and import of some rules that would be stored. Currently I have an import button on options.html which opens a file picker to choose the input JSON file and will parse and store the information into the addon.
This solution works fine if options.html is in a separate tab, but does not work when it is just being used as a popup from clicking on the addon icon. It looks to me that the popup closes once the file picker comes up. This makes sense to me from a popup behavior perspective.
Is there a way to keep the popup open even during the file picker process? Or do I need to push the import/export process only when options.html is in a separate tab?
NOTE:
I’m pretty sure this can happen also with exports!
Some users have “Always ask where to save file” option enabled in Firefox, so for them Firefox will again show a target download folder picker and the export will then fail.
Yeah, this is what I will end up doing. I’ll probably just create a link/button on the options page to open a new tab with the import/export options. (I did vote for the bug and I will watch it)