Minecraft wiki entry for Zombie, associated text: If a zombie is attacking villager and sees the player, it interrupts its attack on the villager to attack the player instead, even if the player has not attacked it‌[JE only].
Once a zombie has targeted a villager, the zombie ignores any other villagers and the player, until its target is dead or the zombie is attacked‌[JE only].