After leaving the chat panel, the player should just hit esc once to leave it, if you accidentally type something long, you can also hit esc to erase it.:D (From spiral knight lol sorry.)