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:
import { useEffect } from "react";
function IndexPopup() {
useEffect(() => {
window.open('./tabs/browse-links.html');
});
return (<></>);
}
export default IndexPopup;
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:
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
[ ] I would like to fix this BUG via a PR
Code of Conduct
[X] I agree to follow this project's Code of Conduct
[X] I checked the current issues for duplicate problems.
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