Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read properties of undefined (reading 'activeElement') #711

Open
RuellePaul opened this issue Feb 2, 2023 · 3 comments

Comments

@RuellePaul
Copy link

When migrate to Vite 4, I'm getting this error :

Uncaught TypeError: Cannot read properties of undefined (reading 'activeElement')
    at Object.getActiveElement (cleave-react-node.js:2766:37)
    at Object.setSelection (cleave-react-node.js:2741:31)
    at ReactClassComponent.componentDidUpdate (cleave-react-node.js:103:15)
    at commitLifeCycles (react-dom.development.js:20684:24)
    at commitLayoutEffects (react-dom.development.js:23426:7)
    at HTMLUnknownElement.callCallback2 (react-dom.development.js:3945:14)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:16)
    at invokeGuardedCallback (react-dom.development.js:4056:31)
    at commitRootImpl (react-dom.development.js:23151:9)
    at unstable_runWithPriority (scheduler.development.js:468:12)

I'm using the lib correctly 'cause it worked with CRA.

This code from this cleave-react-node seems involved :

getActiveElement: function getActiveElement(parent) {
   var activeElement = parent.activeElement;
   if (activeElement && activeElement.shadowRoot) {
      return this.getActiveElement(activeElement.shadowRoot);
   }
   return activeElement;
}

Do you have any idea what I can do ?

@jdavis-software
Copy link

@RuellePaul did you ever find a solution for this? running into the same problem.

@RuellePaul
Copy link
Author

@RuellePaul did you ever find a solution for this? running into the same problem.

I changed for another library 😄

@boydvoid
Copy link

boydvoid commented Oct 4, 2023

@RuellePaul which library?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants