Fixed resizing bug for Chrome/FF

https://code.google.com/p/chromium/issues/detail?id=422919