Getting file from file chooser after extension popup closed

Ironically, the normal way to listen to the change event does work in chrome, https://github.com/BoostPic/BoostPic/blob/fe278339a4a9b94cd39bd2d9272f19d376159a30/BoostPic_Chrome/ts/main.ts#L297.

I am wondering whether there is a programmatical way to control ui.popup.disable_autohide from the extension in firefox, https://extensionworkshop.com/documentation/develop/debugging/#debugging-popups