Fix #1887, just need to make this work for resizing, only applies to Chrome user agents for the moment.