The matter of what breaks the prayer was mentioned in the presence of Sayyiduna Ibn Abbas (may Allah be pleased with them both), and he said: What do you say about a young goat? The Messenger of Allah (peace and blessings be upon him) was praying when a young goat began to pass in front of him (peace and blessings be upon him), and the Messenger of Allah (peace and blessings be upon him) hastened towards the qiblah (trying to stop it). And one day the Messenger of Allah (peace and blessings be upon him) was praying while a female donkey belonging to al-Fadl bin Abbas (may Allah be pleased with him) was grazing in front of him (peace and blessings be upon him).
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 12650