Update utils.js

offset always return 0 in iOS, use getBoundingClientRec() and tested in most browsers