Replies: 1 comment
-
AFAIK, some browser will not let you auto trigger window.open, it has to have user context. You can just use BGSW with the createTab directly, no need to proxy through the popup API - use the action API onClick instead and you'd be all set. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What happened?
I am developing a browser extension called Dev Links, and when the user clicks on the extension button, a new tab must be open to show a list of links an resources. My project has the src folder, and I create following the steps of the plasmo documentation.
Here is the code of the popup:
It works correctly in Chrome, Brave, Opera and Edge. But in Firefox, when I click the extension button nothing happens. I have debugged it and I have added a log inside the useEffect, and the log appears in the console however the window.open call does not work.
I have tried to add a button to the popup, and click in that button programatically, but it does not work too. Here is what I tried:
In the meanwhile I decided to show the popup only to firefox users:
Could you say why this happes? I think it must be a bug. But if it does not have a quick fix, please could you tell me some workaround so all the user could have the same experience?
Version
Latest
What OS are you seeing the problem on?
Linux
What browsers are you seeing the problem on?
Firefox
Relevant log output
No response
(OPTIONAL) Contribution
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions