Jabir bin Abdullah reported,

The Messenger of Allah ﷺ sent me on an errand, and then I caught up with him while he was traveling. (Qutayba said, "while he was praying.") I greeted him with salaam, and he gestured to me. When he finished, he called me over and said, "You greeted me just now while I was praying," and at that time he was facing toward the east.

Azami 2645

Sahih

عن جابر أنه قال

إن رسول الله ﷺ بعثني الحاجة ثم أدركته وهو يسير (قال قتيبة: يصلي) فسلمت عليه. فأشار إلي. فلما فرغ دعاني فقال: إنك سلمت آنفا وأنا أصلي وهو موجه حينئذ قبل الشرق.

الأعظمي 2645صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Minor actions do not invalidate the prayer
Section
Returning the greeting by gesture during prayer
Numbering
Jami al-Kamil 2645 (2nd edition)
Azami 2645