Still working on the addon, and for ease of use, I am separating one configuration item into a separate popup page.
So I have a button that opens the popup.
The first time, the window/tab (depending on user settings) opens, and the second time, the window reloads, but the 3rd and subsequent clicks, a new window opens (with the same url).
The button code on the options.html page is:
<button type="button" id="customTagBtn">Custom Tags</button>
The code on the options.js is this:
document.getElementById('customTagBtn').onclick =
function() {
window.open("custom_tags.html","Custom_Tags","resizable, scrollbars");
}
According to what I have read, giving the window a name (except for “_blank” should prevent a duplicate window from opening, but it does not.
What am I missing?
On edit:
Yes, I know that I can use an if statement to fix this, I’m just wondering if this is a bug, which I should report, or a feature.