Make a forward selection that starts in the text before the image and ends in the text after the image
<p>Line of text</p>
<p>Line o{f text</p>
<figure>...</figure>
<p>Line o}f text</p>
<p>Line of text</p>
Check if the balloon toolbar is attached to the end of the selection