Need to be careful with assuming ClientRects are non-null. Some browsers will return null if the node isn't visible, or is collapsed. Usually best to assume these can be null until checked