cca1393f2b
Make sure to validate both width and height before running "setDimensions();".
The focus point will not work if we have "img { width: 100%; }" in the stylesheet.
This pull request will fix the bug.