tuax / tua-body-scroll-lock

🔐 Body scroll locking that just works with everything
https://tuax.github.io/tua-body-scroll-lock/
MIT License
425 stars 31 forks source link

bug: Cannot read property 'clientY' of undefined #33

Closed cherish1260 closed 1 year ago

cherish1260 commented 4 years ago

Version 1.0.0

ios 11

error: Cannot read property 'clientY' of undefined

HTMLDivElement.i.ios.f.indexOf.e.ontouchstart()

BuptStEve commented 4 years ago

额,能不能按照 issue 模板填一下?有中文版的...

BuptStEve commented 4 years ago

image

建议 fork 以下某个平台的 demo 复现一下:

demo 就报错了么?

cherish1260 commented 4 years ago

image

建议 fork 以下某个平台的 demo 复现一下:

demo 就报错了么?

因为目前项目里使用了报错统计,目前能看到的是在ios11上会报clientY' of undefined的错;

定位到是在 targetElement.ontouchstart = (event) => { initialClientY = event.targetTouches[0].clientY; initialClientX = event.targetTouches[0].clientX; }; 这里在获取clientY时报的错

BuptStEve commented 4 years ago

哦哦,就是偶现的咯?

cherish1260 commented 4 years ago

哦哦,就是偶现的咯? 目前看,只要是ios11版本的都会报错,其他的是好使的

evinma commented 4 years ago

辛苦给一个可以复现问题的版本,我这里用demo页测试没发现报错。 测试ios版本: 11.0.2 fork 以下某个平台的 demo 复现一下: