Question: For example, a person leaves the masjid, that is, he passes the wall of the masjid a little to buy medicine then he returns immediately. Does he have to pray the tahiyyatul masjid here [in this case]?
Shaikh: He was sitting in the masjid?
Questioner: Yes sitting in the masjid.
Shaikh: Then he left?
Questioner: He came out. He passed the wall of the masjid a little
Shaikh: Then he must. Whether he leaves a little or a lot, as long as he leaves the masjid, then he must pray tahiyyatul masjid before sitting”
[Mutafarriqaat no. 1]
Faisal Ibn Abdul Qaadir Ibn Hassan