dismissing keyboard and killing popup window when changing to portrait ref #6