Hide messages preview box when pressing the escape key