Language:
كتاب الأذان
10
Call to Prayers (Adhaan)
(92)
Chapter: Looking towards the sky during As-Salat (the prayer)
(92)
باب رَفْعِ الْبَصَرِ إِلَى السَّمَاءِ فِي الصَّلاَةِ
Sahih al-Bukhari 750

Narrated Anas bin Malik:

The Prophet (ﷺ) said, "What is wrong with those people who look towards the sky during the prayer?" His talk grew stern while delivering this speech and he said, "They should stop (looking towards the sky during the prayer); otherwise their eyesight would be taken away."

حَدَّثَنَا عَلِيُّ بْنُ عَبْدِ اللَّهِ، قَالَ أَخْبَرَنَا يَحْيَى بْنُ سَعِيدٍ، قَالَ حَدَّثَنَا ابْنُ أَبِي عَرُوبَةَ، قَالَ حَدَّثَنَا قَتَادَةُ، أَنَّ أَنَسَ بْنَ مَالِكٍ، حَدَّثَهُمْ قَالَ قَالَ النَّبِيُّ صلى الله عليه وسلم ‏"‏ مَا بَالُ أَقْوَامٍ يَرْفَعُونَ أَبْصَارَهُمْ إِلَى السَّمَاءِ فِي صَلاَتِهِمْ ‏"‏‏.‏ فَاشْتَدَّ قَوْلُهُ فِي ذَلِكَ حَتَّى قَالَ ‏"‏ لَيَنْتَهُنَّ عَنْ ذَلِكَ أَوْ لَتُخْطَفَنَّ أَبْصَارُهُمْ ‏"‏‏.‏
Reference : Sahih al-Bukhari 750
In-book reference : Book 10, Hadith 144
USC-MSA web (English) reference : Vol. 1, Book 12, Hadith 717
  (deprecated numbering scheme)