Isaac too — how greatly he rejoiced! The Holy One, blessed be He, rescued him from the sword and from the fire, and saved him from the men of Gerar, and made him known to them, so that they came to him. As it is said: "And Abimelech went to him from Gerar... and they said: We have surely seen that the LORD has been with you" (Genesis 26:28). Yet he did not remain in his joy. Rather: "And it came to pass, when Isaac was old, and his eyes were too dim to see" (Genesis 27:1). Now if such a thing befell Isaac, the burnt offering of the Holy One, blessed be He, then the wicked all the more so! Therefore it is said: "I said to the boastful: Do not boast" (Psalms 75:5).
Isaac's Joy Cut Short by Blindness in Tanchuma Shmini
Midrash Tanchuma Buber, Shmini 3:4
יצחק (לא המתין בשמחתו) [אף הוא כמ שמח], מילטו הקב"ה מן החרב ומן (השרפה) [האש] (ומאנשי גרר) [והצילו מאנשי גרר], והודיע להם [מי היה ובאו הן אצלו] שנאמר ואבימלך הלך אליו מגרר [וגו' ויאמרו ראה ראינו כי היה ה' עמך] (בראשית כו כח), ולא המתין בשמחתו, אלא ויהי כי זקן יצחק ותכהין עיניו מראות (שם כז א), ומה יצחק עולתו של הקב"ה כך, והרשעים על אחת כמה וכמה, [לכך נאמר אמרתי להוללים אל תהולו].