Section V: When an Eclipse Occurs During the Time of a Wajib or Optional Prayer

Firstly: When an eclipse occurs at the time of a wajib prayer and missing the time of the wajib prayer is feared
If an eclipse occurs at the same time as a wajib prayer – even if it is the Friday prayer – and it is feared that the time for the wajib prayer might pass, the wajib prayer is offered first. This is by agreement of the four schools of jurisprudence.

Secondly: When an eclipse occurs at the time of a wajib prayer and there is no fear of missing the wajib prayer
If an eclipse occurs at the time of a wajib prayer and there is no fear of missing that prayer, then the eclipse prayer is offered first. This is by agreement of the four schools of jurisprudence.

Thirdly: When an eclipse occurs at the time of the witr prayer
If the eclipse occurs at the time of witr, the eclipse prayer is given precedence, even if one fears missing witr. Hanafi, Shafi`i, and Hanbali jurists have explicitly mentioned this. 

Fourthly: When an eclipse occurs at the time of the taraweeh prayer
Scholars are of two positions regarding an eclipse occurring at the time of the taraweeh prayer – which should be offered first?
The first position: When an eclipse happens at the time of taraweeh, the eclipse prayer is given priority, even if one fears missing taraweeh. This is the position of the Shafi`i school.
The second position: When an eclipse happens at the time of taraweeh and it is impossible to offer both, then taraweeh is given priority. This is the position of the Hanbali school.