Sahih al-Bukhari, Book 10, Hadith 145 (In-Book) ⓘ
Narrated `Aisha: I asked Allah's Messenger about looking hither and thither in prayer. He replied, "It is a way of stealing by which Satan takes away (a portion) from the prayer of a person."
حَدَّثَنَا مُسَدَّدٌ، قَالَ حَدَّثَنَا أَبُو الأَحْوَصِ، قَالَ حَدَّثَنَا أَشْعَثُ بْنُ سُلَيْمٍ، عَنْ أَبِيهِ، عَنْ مَسْرُوقٍ، عَنْ عَائِشَةَ، قَالَتْ سَأَلْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم عَنْ الاِلْتِفَاتِ فِي الصَّلاَةِ فَقَالَ " هُوَ اخْتِلاَسٌ يَخْتَلِسُهُ الشَّيْطَانُ مِنْ صَلاَةِ الْعَبْدِ " .
also referenced under: Hadith 751 (DarusSalam) & Volume 1, Book 12, Hadith 718 (USC-MSA)