fix try_to_append_line for ImageBox

````
<div>
   test
   <img src="test.jpeg"/>
</div>
````

if reduce window size, img is disapper.
this pr fixes this case.