That particular event handler was written by me pretty recently (https://github.com/cmaish/JabbR/commit/4c7b1f8129e931566f7a2b62bc97dc6e7069731e#JabbR/Chat.ui.js) and I made it too broad.  The entire purpose of it was to try to close whatever tab you middle click on, and while I tested that it didn't close the lobby, I didn't notice that it gave an error message if you try to close the lobby while you're focussed in another room.

I'm quite confident that in the current codebase this will work and have the desired effect.  The only reason that I can think of that we might want a more broad handler is if we introduce non-lobby, non-room tabs that we want to be able to close, though these are going to require their own code anyways (as the closeRoom event which is raised here won't be appropriate, etc).