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.

Uncaught TypeError: Cannot read property 'pageX' of undefined

See original GitHub issue

This error originates from the pointerMove event listener, initiating a call chain to setEventXY and getPageXY, where evidently the pointer is has been passed in as undefined.

Seen on Google Chrome and Chrome Mobile, running on WIndows 8.1, Android 4.4, Windows (version undefined) and Linux.

getPageXY should handle null pointer exceptions (no pun intended).

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:5
  • Comments:55 (24 by maintainers)

github_iconTop GitHub Comments

17reactions
tayecommented, Dec 19, 2016

I’ve pushed a thing to the stable branch to avoid PointerEvents in Chrome. If you’re using v1.2.*, updating to v1.2.8 should solve this issue when it’s related to PointerEvents.

13reactions
stevelovecommented, Dec 9, 2016

@taye I haven’t tried the unstable branch, but I can easily reproduce this issue in Chrome 55.0.2883.75 on http://interactjs.io/

Steps to reproduce:

  1. Make sure your browser window is not maximized.
  2. Open the Chrome Developer Tools console.
  3. Visit http://interactjs.io/
  4. Move your mouse off of, then back onto the browser window again.
  5. Observe that each time your mouse moves onto the browser window, Uncaught TypeError: Cannot read property 'pageX' of undefined appears in the console.

Alternative reproduction: The error appears simply by moving your mouse onto the webpage from the browser chrome area (tabs, address bar, bookmarks, etc).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'pageX' of ...
Your error is that you are invoking both functions mousePos and mouseClicked instead of setting them as values to be passed on events:...
Read more >
Uncaught TypeError: Cannot read property 'pageX' of null
Hi @jaimeggb , The pageX key is a property of the event parameter i.e the first parameter of the handleMouseOver function(event, data). Change ......
Read more >
MouseEvent pageX Property - W3Schools
The pageX property returns the horizontal coordinate (according to the document) of the mouse pointer when a mouse event was triggered.
Read more >
Javascript – Uncaught TypeError: Cannot read property 'pageX' of ...
Javascript – Uncaught TypeError: Cannot read property 'pageX' of undefined. androidcordovajavascriptjquerytouchstart. I am tinkering with touchevents in js.
Read more >
Uncaught TypeError: Cannot read property 'pageX' of undefined
Uncaught TypeError: Cannot read property 'pageX' of undefined ... This error originates from the pointerMove event listener, initiating a call ...
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