A workaround for the Range.getClientRects bug in Chrome