Abdullah bin Abbas reported,

A woman used to pray behind the Prophet ﷺ who was beautiful, among the most beautiful of people. Some of the men would press forward to be in the first row so as not to see her, while others would hold back so as to be in the last row, and when such a man bowed, he would do like this, peering out from beneath his armpit. So Allah revealed, concerning her, "And We certainly know those among you who go forward, and We certainly know those who lag behind" [Hijr 15:24].

Ibn Majah 1046

Daif

حدثنا حميد بن مسعدة وأبو بكر بن خلاد قالا حدثنا نوح بن قيس حدثنا عمرو بن مالك عن أبي الجوزاء

عن ابن عباس قال

كانت امرأة تصلي خلف النبي ﷺ حسناء من أحسن الناس فكان بعض القوم يستقدم في الصف الأول لئلا يراها ويستأخر بعضهم حتى يكون في الصف المؤخر فإذا ركع قال هكذا ينظر من تحت إبطه فأنزل الله {ولقد علمنا المستقدمين منكم ولقد علمنا المستأخرين} في شأنها

ابن ماجه 1046ضعيف
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Establishing prayer and the sunnah regarding it
Chapter
Humility in prayer
Numbering
Darussalam 1046
Ibn Majah 1046