To my knowledge, Sergey Brin remained on as president (although he was not CEO) after admitting to an affair with a Google employee, and every other publicly-confirmed affair with a subordinate led to the CEO stepping down. Boards HAVE been known to put in a lot of effort to keep affairs from being publicly confirmed, though.