How to load file into webExtension popup

I’m porting my extension from chrome.
In the popup window I have a file upload option using <input type="file"....
In chrome the popup stays open while the user is selecting their file in the file selector window.
However, in Firefox as soon as the user click on the file upload window the popup window disappears and the the file select loses all context, the js stop running etc.

Is there a way to keep the popup window open while the user is selecting the file? Or reopen the window with the context of the file selected?

If I open the Browser Tool box and disable autohide for panels, I can successfully upload a file into the extension.

2 Likes

I think the popup should stay open as well in Firefox, if you could please file a bug about this, that would be awesome -

If you need to file a WebExtension bug, please file it against the
"WebExtensions" component in the “Toolkit” product, and tag it with the
"dev-doc-needed" keyword. This link should pre-fill all the right
fields: File a WebExtension Bug.

This quote on how to file a bug was taken from - https://hacks.mozilla.org/2015/10/porting-chrome-extensions-to-firefox-with-webextensions/

1 Like

Thanks!

I have opened a ticket for this issue.

https://bugzilla.mozilla.org/show_bug.cgi?id=1292701

2 Likes

So only one way to resolve this problem is to wait for Mozilla update with problem fix?

Yes. Or if you are familiar with the moz internals, or want to get familiar with it, you can help out on the bug.

You can also vote on the bug so it can have more attention