Fix wikitext warning: Get range from selection before trying to find start

Bug: 72475
Change-Id: Ib43d9c6b9b46be461354b3b5bbdf9d5de90887a6
Update VE core for cherry-pick of I2b368b0d0

Change-Id: I6bc2f445969c01677bb882bdbd45efbd83290c3f
Merge "Update VE core for cherry-pick of I2b368b0d0" into wmf/1.25wmf4