question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'classList' of null

See original GitHub issue

When quickly slide the page, it may come across Cannot read property ‘classList’ of null or Cannot read property ‘style’ of null image

I think the reason is the onReset function handler.ptrElement = null; handler.ptrElement is set to null ,but it is referenced in touchmove callback however.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:12

github_iconTop GitHub Comments

1reaction
crusycommented, Apr 16, 2018

I have the same problem here. Explicitly setting ptrElement helps avoiding this error, but I get an

Uncaught TypeError: Cannot set property ‘innerHTML’ of null at Object.update (pulltorefresh.js:125)

instead, at _onTouchStart (pulltorefresh.js:160), _onTouchMove (pulltorefresh.js:188), _onTouchMove (pulltorefresh.js:206), _onTouchEnd (pulltorefresh.js:249).

0reactions
NightCatSamacommented, May 10, 2018

Solved, thank you. 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'classList' of null
It means that document.getElementById("lastName") is returning undefined and you're trying to call classList on undefined itself.
Read more >
[Input Masks Library] Cannot read property 'classList' of null
Hi there,. I am using the credit card mask but i keep receveing the error Cannot read property 'classList' of null every time...
Read more >
Error "TypeError: Cannot read property 'classList' of null"
Hello, I am trying when simple code to add datepicker in javascript using below HTML and Javascript Code, but I am getting error...
Read more >
Cannot read property 'classList' of null - responsive menu
My understanding is that the script is trying to remove navTop.classList.remove(“responsive”); however fails to do so. The CSS can be found here http:// ......
Read more >
menu – Cannot read property 'classList' of null - WordPress.org
twentysixteen child theme – menu – Cannot read property 'classList' of null ... The above code did work when I used with a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found