Whenever I press "Esc" the game would minimize itself

Comment below rating threshold, click here to show it.




This doesn't always happen but I was playing a normal game today and when I tried read something in chat and I pressed enter, when I pressed escape my game minimized. Also when I tried to type something in chat nothing would come up. When I tried to close the shop with escape it minimized again. Does anyone know how to fix my problem?