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.

[5.2.1] Error: Cannot read property 'clientX' of undefined

See original GitHub issue

I get this error in the console

Uncaught TypeError: Cannot read property 'clientX' of undefined
    at onMouseMove (tippy.esm.js:411)
    at triggerLastMouseMove (tippy.esm.js:397)

Tooltip renders initially at the top left of a window, and then when I move the mouse, it positions itself where it should be (following the cursor from now on)

I have used Tippy like so: (just the relevant code)

import Tippy from '@tippy.js/react';
import { followCursor } from 'tippy.js';
...

const [isTooltipVisible, setIsTooltipVisible] = useState(false);
return (
<Tippy
  plugins={[followCursor]}
  followCursor
  content="Save layout changes to edit this widget."
  visible={isTooltipVisible}
  trigger="manual"
>
  <SomeStyledComponent onClick={() => setIsTooltipVisible(true)}>...</SomeStyledComponent>
<Tippy>
);

When I click on my component I get this error in the console.

Screen Shot 2020-02-17 at 13 43 12

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
atomikscommented, Feb 20, 2020

This error is fixed in the next major which uses Popper 2 (coming by the end of this month)

0reactions
andi1984commented, May 13, 2020

Just FYI:

For me it seems that the issue got introduced with “popper.js”: “^1.16.0” or some other change within Tippy.js v 5.0.4

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'clientX' of undefined, using jquery
When you pass no arguments, in function get_mouse_pos variable e is undefined . var canvas; var context; function getMousePos(e) { var canBoundX ...
Read more >
[5.2.1] Error: Cannot read property 'clientX' of undefined #169
I get this error in the console Uncaught TypeError: Cannot read property 'clientX' of undefined at onMouseMove (tippy.esm.js:411) at ...
Read more >
Bug or not bug? Cannot read property 'clientX' of undefined
Hi, all! I ran into a problem under mobile browsers, which occurs in the code library_sdl.js: switch ...
Read more >
All Unit Tests | Fabric.js Demos
TypeError : Cannot read properties of undefined (reading 'x') at ... 4var fabric = fabric || { version: '5.2.1' }; ... clientX +...
Read more >
Changelog - Cypress Documentation
Cypress no longer throws the error "cannot read property split of undefined" in certain circumstances when application errors are thrown. Fixes #17378.
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