What strikes me as interesting, though, is the way in which many revisionist historians of early Islam take the exact opposite approach, tending to see Jerusalem as the original Muslim holy city which was only gradually overtaken by Mecca. In their Hagarism: The Making of the Islamic World, Patricia Crone and Michael Cook argue based on 7th-century Christian sources that Islam began as a Jewish messianic movement centered around the concept of the Children of Ishmael returning to Jerusalem. They later dedicate half a chapter to how an originally obscure Mecca came to occupy its present place in the Muslim religious system. In their Crossroads to Islam, Yehuda Nevo and Judith Koren go so far as to suggest that references to Jerusalem fell out of the Qur'anic corpus based on the fact it occurs in inscriptions otherwise based on Qur'anic verses, such as being the place where a herald will call from in 50:41. There are also anomalies in the evidence about the direction of the qibla in early Islam that suggest Muslims may have prayed facing Jerusalem for some decades after the death of the Prophet.
The revisionist historians mentioned above have problems of their own, so I don't mean to suggest they've stumbled across the truth regarding the development of Islam as a whole. (I do think it's gradually becoming undeniable that the core of Islam as practiced by early Muslims was a very basic monotheism with Abraham as the key figure, and that Muhammad as messenger gradually increased in importance during the Umayyad and early Abbasid periods.) While the evidence is very open to different interpretations though, it does seem likely that Jerusalem was seen as a significant holy city for the first few generations of Muslims, regardless of what happened later.