What is the significance of the fact that Yehudah was in Keziv when his wife gave birth to him (their third son)? Why did she call him Shelah?
Targum Yonasan: She claimed that Yehudah had forgotten 4 her.
Ramban #1 (citing the Ibn Ezra): The Pasuk is merely informing us that all three sons were born in the same place. 5 She called their son Shelah, because of its similar meaning to the meaning of Keziv.
Moshav Zekenim, Da'as Zekenim and Hadar Zekenim: Because he was in Keziv, she named the baby. 6
Seforno: Her hope to see her husband when she gave birth was Nichzevah (made false, i.e. was not fulfilled), because he was in Keziv (and not with her). Had he been there, he would not have allowed her to give a derogatory name.
Malbim: It says that he was in Keziv, for now Yehudah removed her from her father's city, and converted her. Therefore, her third son received a favorable name (and was not a Rasha - PF).
Ha'Emek Davar: The midwife recognized that she will not bear more children because her womb was damaged.
As if the Torah had written "when she bore them".
Moshav Zekenim asks why he could not name the baby where he was. Perhaps he did not hear about the birth until after the B'ris! (PF)
Why didn't the Torah mention that she became pregnant with Shelah?
Moshav Zekenim: After Onan died, Yehudah told Tamar to wait until Shelah matures! Really, he was the same age, and this was a mere excuse for him not to marry her. (Perhaps even though he was old enough to do Yibum, Yehudah wanted to wait until he matures more, lest he repeat Onan's mistake. - PF)
Rosh: Rashi brings from Bereishis Rabah (85:4) "Pasakt". I.e. it was the end of her birth.