(Imām Bukhārī narrates): Ismā'īl narrated to us, he said: Imām Mālik narrated to us, from Zaid ibn Aslam, from 'Atā' ibn Yasār, from 'Abdullāh ibn 'Abbās, may Allāh be pleased with them both, he narrated that:
in the time of the Messenger of Allāh ﷺ, the sun was eclipsed, so he prayed. The Companions said: O Messenger of Allāh! We saw that you were taking hold of something from your place, then we saw that you were stepping back. He said: Paradise was shown to me, so I intended to take hold of a cluster of Paradise, and if I had taken hold of it, you would have kept eating from it as long as this world remained.
حَدَّثَنَا إِسْمَاعِيلُ، قَالَ حَدَّثَنِي مَالِكٌ، عَنْ زَيْدِ بْنِ أَسْلَمَ، عَنْ عَطَاءِ بْنِ يَسَارٍ، عَنْ عَبْدِ اللَّهِ بْنِ عَبَّاسٍ، رضى الله عنهما قَالَ خَسَفَتِ الشَّمْسُ عَلَى عَهْدِ رَسُولِ اللَّهِ صلى الله عليه وسلم فَصَلَّى، قَالُوا يَا رَسُولَ اللَّهِ، رَأَيْنَاكَ تَنَاوَلُ شَيْئًا فِي مَقَامِكَ، ثُمَّ رَأَيْنَاكَ تَكَعْكَعْتَ. قَالَ " إِنِّي أُرِيتُ الْجَنَّةَ، فَتَنَاوَلْتُ مِنْهَا عُنْقُودًا، وَلَوْ أَخَذْتُهُ لأَكَلْتُمْ مِنْهُ مَا بَقِيَتِ الدُّنْيَا ".
Reference: Sahih Al Bukhari 748