صحيح البخاري Sahih Bukhari كتاب الأذان (صفة الصلوة) The Book of Adhan (Sufa-tus-Salat)
بَابُ هَلْ يَلْتَفِتُ لأَمْرٍ يَنْزِلُ بِهِ أَوْ يَرَى شَيْئًا أَوْ بُصَاقًا فِي الْقِبْلَةِ:

(94) Chapter. Is it permissible for one to look around in Salat (prayer) if something happens to one? Or can one look at something like expectoration in the direction of the Qiblah?

2 hadith
Hadith 753
حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ ، قَالَ : حَدَّثَنَا لَيْثٌ ، عَنْ نَافِعٍ ، عَنْ ابْنِ عُمَرَ ، أَنَّهُ قَالَ : رَأَى النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ نُخَامَةً فِي قِبْلَةِ الْمَسْجِدِ وَهُوَ يُصَلِّي بَيْنَ يَدَيِ النَّاسِ ، فَحَتَّهَا ، ثُمَّ قَالَ حِينَ انْصَرَفَ : " إِنَّ أَحَدَكُمْ إِذَا كَانَ فِي الصَّلَاةِ فَإِنَّ اللَّهَ قِبَلَ وَجْهِهِ ، فَلَا يَتَنَخَّمَنَّ أَحَدٌ قِبَلَ وَجْهِهِ فِي الصَّلَاةِ " ، رَوَاهُ مُوسَى بْنُ عُقْبَةَ ، وَابْنُ أَبِي رَوَّادٍ ، عَنْ نَافِعٍ .
Narrated Ibn `Umar: The Prophet saw expectoration in the direction of the Qibla of the mosque while he was leading the prayer, and scratched it off. After finishing the prayer, he said, "Whenever any of you is in prayer he should know that Allah is in front of him. So none should spit in front of him in the prayer."
Hadith Reference Sahih Bukhari / The Book of Adhan (Sufa-tus-Salat) / Hadith: 753
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة
Hadith 754
حَدَّثَنَا يَحْيَى بْنُ بُكَيْرٍ ، قَالَ : حَدَّثَنَا لَيْثُ بْنُ سَعْدٍ ، عَنْ عُقَيْلٍ ، عَنْ ابْنِ شِهَابٍ ، قَالَ : أَخْبَرَنِي أَنَسٌ ، قَالَ : " بَيْنَمَا الْمُسْلِمُونَ فِي صَلَاةِ الْفَجْرِ لَمْ يَفْجَأْهُمْ إِلَّا رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ كَشَفَ سِتْرَ حُجْرَةِ عَائِشَةَ فَنَظَرَ إِلَيْهِمْ وَهُمْ صُفُوفٌ فَتَبَسَّمَ يَضْحَكُ ، وَنَكَصَ أَبُو بَكْرٍ رَضِيَ اللَّهُ عَنْهُ عَلَى عَقِبَيْهِ لِيَصِلَ لَهُ الصَّفَّ فَظَنَّ أَنَّهُ يُرِيدُ الْخُرُوجَ وَهَمَّ الْمُسْلِمُونَ أَنْ يَفْتَتِنُوا فِي صَلَاتِهِمْ ، فَأَشَارَ إِلَيْهِمْ أَتِمُّوا صَلَاتَكُمْ فَأَرْخَى السِّتْرَ وَتُوُفِّيَ مِنْ آخِرِ ذَلِكَ الْيَوْمِ " .
Narrated Anas: While the Muslims were offering the Fajr prayer, Allah's Apostle suddenly appeared before them by living the curtain of the dwelling place of `Aisha, looked towards the Muslims who were standing in rows. He smiled with pleasure. Abu Bakr started retreating to join the row on the assumption that the Prophet wanted to come out for the prayer. The Muslims intended to leave the prayer (and were on the verge of being put to trial), but the Prophet beckoned them to complete their prayer and then he let the curtain fall. He died in the last hours of that day.
Hadith Reference Sahih Bukhari / The Book of Adhan (Sufa-tus-Salat) / Hadith: 754
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة