Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:1669ʿAbd al-Khāliq b. ʿAlī al-Muʾadhhin > Abū Bakr b. Khanb > Muḥammad b. Ismāʿīl al-Tirmidhī > Ayyūb b. Sulaymān b. Bilāl > Abū Bakr b. Abū Ūways > Sulaymān b. Bilāl > Yūnus b. Zayd > al-Zuhrī > Khārijah b. Zayd

[Machine] And he used to pray while he was exiting from it.  

البيهقي:١٦٦٩أَخْبَرَنَا عَبْدُ الْخَالِقِ بْنُ عَلِيٍّ الْمُؤَذِّنُ أنبأ أَبُو بَكْرِ بْنُ خَنْبٍ ثنا مُحَمَّدُ بْنُ إِسْمَاعِيلَ التِّرْمِذِيُّ ثنا أَيُّوبُ بْنُ سُلَيْمَانَ بْنِ بِلَالٍ حَدَّثَنِي أَبُو بَكْرِ بْنُ أَبِي أُوَيْسٍ حَدَّثَنِي سُلَيْمَانُ بْنُ بِلَالٍ عَنْ يُونُسَ بْنِ زَيْدٍ عَنِ الزُّهْرِيِّ عَنْ خَارِجَةَ بْنِ زَيْدٍ قَالَ كَانَ زَيْدُ بْنُ ثَابِتٍ قَدْ سُلِسَ مِنْهُ الْبَوْلُ فَكَانَ يُدَارِي مِنْهُ مَا غَلَبَ فَلَمَّا غَلَبَهُ أَرْسَلَهُ قَالَ

وَكَانَ يُصَلِّي وَهُوَ يَخْرُجُ مِنْهُ