ANSWER:

No problem.

It should be done for any kind of distractions.

If one gets thoughts in his prayer that are taking his mind away from the actually prayer’s parts like tasbeeh and the surahs one reads, but such thoughts are about Islam like the Seerah or the story of the companions, is it disrespectful to Islam or kufr if he seeks refuge in Allah from Satan and spits 3 times to his left as he would normally do with distractive thoughts?

Prayer |