IRC Chat Button Can Close Game Window

I noticed a potential problem with the IRC Chat button.

After opening the IRC Chat window, I was back in the main game window playing, then wanted to check the chat window and clicked on the IRC Chat button again. (I could have used Alt-Tab but I had many windows open.)

Clicking on the IRC Chat icon when the chat window was already open forced a familiar pop-up alert asking whether I wanted to close the window or stay on that page.

The first time I clicked NO (do not leave page) and the game window closed while the chat window stayed.

The second time I clicked YES and the game window closed again.

Is it possible to add a line of code, a Conditional statement such as:
. If IRC button clicked AND IRC Chat Window Open = True Then Chat Window receives focus.

The idea being to bypass that pop-up which closes the game no matter what you do.

Interesting. What browser are you using?
Just tried it in FF and cannot reproduce the issue (‘yes’ opens irc login in irc window, ‘no’ does nothing).

I’m using Internet Explorer ver. 11 (Fairly recent: 2013)

I tested again, clicking Yes which once again did close the main game, replacing it with the IRC login window.

I took Before & After screenshots. (Limited to one pic per post, so 2nd pic follows…)

And here is what the screen looked like immediately after selecting Yes.

Thanks, reproducible, confirmed, looking into it.

Should now be solved: popup buttons (leave / stay) should work like intended in IE.
As a side effect, in IE irc window gets focus as soon as the popup opens.

Detection of open irc window / suppression of popup doesn’t seem possible in a reliable way, however.

Fix confirmed. It now works as it should regardless of what is selected. Nice job.