yuanzm / preventoverscrolljs

防止微信Webview下拉露黑底组件
169 stars 75 forks source link

Uncaught TypeError: Cannot read property 'addEventListener' of null #1

Open chongyuan opened 8 years ago

chongyuan commented 8 years ago

Uncaught TypeError: Cannot read property 'addEventListener' of null preventoverscroll.js:157

yuanzm commented 8 years ago

出现这个报错说明你的节点不存在嘛

chongyuan commented 8 years ago

谢谢您的回答; 可是我该怎么操作 preventoverscroll.js 呢? 直接引入还是需要加别的代码?

yuanzm commented 8 years ago

https://github.com/yuanzm/preventoverscrolljs/blob/master/preventoverscroll.js#L134 将你需要作用的元素的放到list里面

chongyuan commented 8 years ago

好的,我试下;谢谢您;

chongyuan commented 8 years ago

您好,添加之后,右侧的滚动条也无法下拉了,请问是否是我哪里用的不对呢? 可是我看您二维码上面提供的页面,滚动条是可以用的;是否是我哪里操作有误呢?

yuanzm commented 8 years ago

http://segmentfault.com/a/1190000003810312?_ea=472032 建议先仔细看看这文章,然后我回头写个demo,文章里面确实疏忽了demo这一块