It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both): A man asked him, "What was the intention of Yusuf (peace be upon him)?" So he (Ibn Abbas) mentioned something, but we did not remember it. Sayyiduna Ibn Abbas (may Allah be pleased with them both) said: Yusuf (peace be upon him) looked at the roof of the house, and he saw Yaqub (peace be upon him) holding his hand and saying, "Do you want to do the deed of the ignorant while your name is written among the Prophets (peace be upon them)?" So (upon hearing this), every kind of desire that was in his body left him, and he ran towards the door, and she also ran after him and tore his shirt.
Hadith Referenceمسند اسحاق بن راهويه / كتاب التفسير / 579
Ibn Abi Mulaykah narrated: Sayyiduna Ibn Abbas (may Allah be pleased with them both) was asked about the "incident" of Yusuf (peace be upon him), what was it? (To what extent did it reach?) He replied: He had untied his waistband, then a voice was called out to him which was not heard, so it was said to him: O son of Yaqub! Do you intend to commit adultery? You will become like that bird which plucks out its own feathers and then has no feathers left.
Hadith Referenceمسند اسحاق بن راهويه / كتاب التفسير / 580
Hadith Takhrij«اسناده صحيح ، تفسير طبري : 183/12 . تفسير الدر المنشور : 520/4 .»