ok check this, in the game u posted, when u open the game in 2 tabs, and add create 2 different names, it says who is client and who's is host right? now when u switch between tabs, always the last message appends, it repeats itself, saying " Player1 has connected", then when i switch to the other tab says "player 2 has connected, "every time repeats so somewhere around those lines, the connection is lost, and reconnects. the problem is at on signaling connected> call add connected that should trigger only 1 time , but for u triggers every time when i switch tabs... not sure how to make it work , i dident worked much with the multiplayer functions yet. but its a matter of connection lost in those events recheck the steps from the example game, maybe is something you missed out, sometimes is c2 getting bugged from to many previews(one thing that solves it is saving the game under another name close c2 and then reopen the new game again.) atleast worked for me, if not try clean ur cache or change from localhost:5000 to 192.168.1.2 i had some issues in past with the address local-host being loading slow or blocking previews, its a problem with firewall and how fast u request the preview. il look into it further please move ur thread in a how do i section since Ashley flagged it as closed i don't want to keep it open as a bug more then it needs unless u don't manage to solve it by events or i could try and see if i work a bit in this manner will help, then u can post the full bug report as it should.
as you said, its the tabs doing the problem, so that means, the game recognizes both tabs being 1 player, i think is because of Firefox latest update, or chrome, if u open the game in Firefox but not in different tabs but in different windows does it act normal?
but this is meant for multiplayer you testing it from same localhost and ip/machine its basics that sometimes will create problems, cause it reads the same ip adress, so if you connect from 2 different pcs and works, then this is not a bug, but a client side, and you should not worrie about it for future online gaming, since all players will be from different machines. i think is closing to problem solved?
next time please do first a "How do i ..." post so we avoid reports and wrong posting please... as much i want to help, i cant if its in wrong thread.