0👍
I encountered a similar issue because i had to check async if a specific url was already opened in any tab (browser.tabs.query
) in order to naviagte to that tab or open the popup. The problem is after the async call the callback isnt an input handler anymore.
Solution:
set the popup to the browser action and make a script (has to be a separat file). Here you can make async calls and window.close()
if something else should happen.
Source:stackexchange.com