It was mentioned before'A'isha that prayer is invalidated (in case of passing) of a dog, an ass and a woman (before the worshipper, when he is not screened). Upon this 'A'isha said: You likened us to the asses and the dogs. By Allah I saw the Messenger of Allah (ﷺ) saying prayer while I lay on the bedstead interposing between him and the Qibla. When I felt the need, I did not like to wit to front (of the Holy Prophet) and perturb the Messenger of Allah (ﷺ) and quietly moved out from under its (i.e. of the bedstead) legs.
Reference: Sahih Muslim 512 d In-book : Book 4, Hadith 305 USC-MSA web (English) : Book 4, Hadith 1038 (deprecated)
Help us gift a modern, ad-free Islamic application for the Muslim Ummah. Your donation will be recorded as Sadaqah Jariyah in your book of deeds, In Sha Allah.