I believe this would require large amount of code to get working (e.g. it requires mouse input while in game, scrollbars, different tabs etc). It's probably not that hard to add but I can't really tell

I'd like to propose a way of doing this that would be a lot easier, but also be good enough for what your asking:
Keep a history of messages hidden in the client (e.g. up to 500 messages), and then allow the player to scroll the history up/down with hotkeys (should be defaulted to PGUP and PGDN). If new messages are received while you're viewing older ones, perhaps an alert should appear advising you to scroll down for new msgs, or if you haven't scrolled up/down for a while, it will eventually scroll down itself, if the user is already fully scrolled down when a new message is received, the client should scroll down automatically too. The coding behind this is extremely simple & doesn't require changes to the visuals of the chat (which I guess is good?).

I'm not sure how you could go about resetting the history, I guess you'd have to reset it if player joins a new room/leaves a room etc. Though it'd be cool if you could leave a room, join a new room, and still look at the old messages