Sahih al-Bukhari, Hadith 748 ⓘ
Narrated `Abdullah bin `Abbas: Once solar eclipse occurred during the lifetime of Allah's Messenger. He offered the eclipse prayer. His companions asked, "O Allah's Messenger! We saw you trying to take something while standing at your place and then we saw you retreating." The Prophet said, "I was shown Paradise and wanted to have a bunch of fruit from it. Had I taken it, you would have eaten from it as long as the world remains."
حَدَّثَنَا إِسْمَاعِيلُ، قَالَ حَدَّثَنِي مَالِكٌ، عَنْ زَيْدِ بْنِ أَسْلَمَ، عَنْ عَطَاءِ بْنِ يَسَارٍ، عَنْ عَبْدِ اللَّهِ بْنِ عَبَّاسٍ، رضى الله عنهما قَالَ خَسَفَتِ الشَّمْسُ عَلَى عَهْدِ رَسُولِ اللَّهِ صلى الله عليه وسلم فَصَلَّى، قَالُوا يَا رَسُولَ اللَّهِ، رَأَيْنَاكَ تَنَاوَلُ شَيْئًا فِي مَقَامِكَ، ثُمَّ رَأَيْنَاكَ تَكَعْكَعْتَ. قَالَ " إِنِّي أُرِيتُ الْجَنَّةَ، فَتَنَاوَلْتُ مِنْهَا عُنْقُودًا، وَلَوْ أَخَذْتُهُ لأَكَلْتُمْ مِنْهُ مَا بَقِيَتِ الدُّنْيَا " .
also referenced under: Book 10, Hadith 142 (In-Book) & Volume 1, Book 12, Hadith 715 (USC-MSA)