insert html lost current selection under safari. it works under chrome, firefox, but doesn't work under safari.
Steps to reproduce using safari:
 1. open this test file
 2. click any position in the editor
 3. click safari address bar or search input box on the top
 4. click execute button
 5. it will insert the image at the beginning.