How to keep Google Chrome Extension popup open?

If I open my extension popup then I open another window or tab following the popup does not stay open if I return to it.

Is there a way to force it so the popup stays open?


Solution 1:

As a user, you currently cannot force the the popup to stay open. That is a UI decision the UI team made. If you want to want to force a setup, you can have other way to show this by changing the popup icon, open a new tab when it requests, or new popup view for registration.

As a developer, inspect the popup, and it will stay open.

Solution 2:

You cannot stop the Chrome pop-up from closing, unless you're in developer mode. You could consider this alternative, though:

Launching a normal pop-up instead:

In your popup.html file, load a Javascript file that runs this:

var popupWindow = window.open(
    chrome.extension.getURL("normal_popup.html"),
    "exampleName",
    "width=400,height=400"
);
window.close(); // close the Chrome extension pop-up

This will open the file normal_popup.html in your extension in a normal pop-up window, which won't close when it loses focus. Because the name parameter is the same, the pop-up window will get reused if the user launches popup.html again.