Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:748Ismāʿīl > Mālik > Zayd b. Aslam > ʿAṭāʾ b. Yasār > ʿAbdullāh b. ʿAbbās

Once solar eclipse occurred during the lifetime of Messenger of Allah ﷺ. He offered the eclipse prayer. His companions asked, "O Messenger of Allah ﷺ! 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."  

البخاري:٧٤٨حَدَّثَنَا إِسْمَاعِيلُ قَالَ حَدَّثَنِي مَالِكٌ عَنْ زَيْدِ بْنِ أَسْلَمَ عَنْ عَطَاءِ بْنِ يَسَارٍ عَنْ عَبْدِ اللَّهِ بْنِ عَبَّاسٍ ؓ قَالَ

خَسَفَتِ الشَّمْسُ عَلَى عَهْدِ رَسُولِ اللَّهِ ﷺ فَصَلَّى قَالُوا يَا رَسُولَ اللَّهِ رَأَيْنَاكَ تَنَاوَلُ شَيْئًا فِي مَقَامِكَ ثُمَّ رَأَيْنَاكَ تَكَعْكَعْتَ قَالَ إِنِّي أُرِيتُ الْجَنَّةَ فَتَنَاوَلْتُ مِنْهَا عُنْقُودًا وَلَوْ أَخَذْتُهُ لأَكَلْتُمْ مِنْهُ مَا بَقِيَتِ الدُّنْيَا