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 on click

See original GitHub issue

When clicking in a scroll-able area I get the following error:

Uncaught TypeError: t.getBoundingClientRect(...).toJSON is not a function
    at t.value (reactCustomScroll.js?:formatted:198)
    at t.value (reactCustomScroll.js?:formatted:186)
    at HTMLUnknownElement.callCallback (react-dom.development.js:542)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:581)
    at Object.invokeGuardedCallback (react-dom.development.js:438)
    at Object.invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:452)
    at executeDispatch (react-dom.development.js:836)
    at executeDispatchesInOrder (react-dom.development.js:858)
    at executeDispatchesAndRelease (react-dom.development.js:956)
    at executeDispatchesAndReleaseTopLevel (react-dom.development.js:967)

Caused by toJSON() being called on the result of getBoundingClientRect() in the isMouseEventOnCustomScrollbar function called from the onClick event handler.

value: function(e) {
                    if (!this.customScrollbarRef)
                        return !1;
                    var t = p.findDOMNode(this)
                      , o = t.getBoundingClientRect().toJSON() <-- here!
                      , n = this.customScrollbarRef.getBoundingClientRect()
                      , r = this.props.rtl ? {

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dogle-scottlogiccommented, May 29, 2018

Hi @rommguy, That has fixed it, not getting the error any more. Thanks 👍

0reactions
rommguycommented, May 29, 2018

@dogle-scottlogic please star this repo if you’re using it, thanks! I appreciate it

Read more comments on GitHub >

github_iconTop Results From Across the Web

JS: Uncaught TypeError: object is not a function (onclick)
I am getting an error onclick: Uncaught TypeError: object is not a function index.html:71 onclick. Here is my Javascript
Read more >
Click() method not working and Console returns an error ...
In this article, we will see “Uncaught TypeError: document.getElementsByClassName(…).click is not a function” error created while using ...
Read more >
TypeError: $(...).onclick is not a function in jQuery | bobbyhadz
The "$(...).onclick is not a function" error occurs, because there is no onclick() function in jQuery. · To solve the error, use the...
Read more >
is not a function at HTMLInputElement.onclick error [closed]
Uncaught Type Error when calling a contract function using the web3 JavaScript API? 0 · Could not call contract function · 2 ·...
Read more >
cannot set properties of null setting onclick - You.com
Uncaught TypeError : Cannot set property 'onclick' of null ... The solution here is to execute the script after the DOM is ready...
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