Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Tex example doesn't work - unable to find node on an unmounted component #1756

Closed
KenCoder opened this issue May 8, 2018 · 3 comments
Closed

Comments

@KenCoder
Copy link

KenCoder commented May 8, 2018

Do you want to request a feature or report a bug?
bug

What is the current behavior?
The tex example doesn't work, generates javascript errors

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

  • Checkout repo at d2a3ae
  • Follow instructions in examples/draft-0-10-0/tex/readme.md
  • Open chrome at localhost:3000
  • Put cursor at the end of the first line and press Backspace
    You see this error in Chrome (and it doesn't delete the character);
Uncaught Error: Unable to find node on an unmounted component.
    at invariant (app.js:12062)
    at Object.findDOMNode (app.js:35151)
    at DraftEditorTextNode.shouldComponentUpdate (app.js:19200)
    at app.js:76800
    at measureLifeCyclePerf (app.js:76251)
    at ReactCompositeComponentWrapper.updateComponent (app.js:76799)
    at ReactCompositeComponentWrapper.receiveComponent (app.js:76722)
    at Object.receiveComponent (app.js:69007)
    at Object.updateChildren (app.js:75997)
    at ReactDOMComponent._reconcilerUpdateChildren (app.js:75550)

What is the expected behavior?
Deletes the character

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
Head of master - d2a3ae
MacOS
I tried it in the v0.10.5 release but I couldn't build the example - it gets sh: babel-node: command not found

@aquiseb
Copy link

aquiseb commented Nov 7, 2018

@KenCoder did you solve this issue? How? Thanks in advance

@KenCoder
Copy link
Author

KenCoder commented Nov 8, 2018

I didn't - ended up going with Tiny MCE, but I wanted to be a good citizen.

@thibaudcolas
Copy link
Contributor

I believe this issue is caused by a discrepancy between the React version defined for Draft.js, and that of the example. Tried to fix this over at #1931.

jdecked pushed a commit to twitter-forks/draft-js that referenced this issue Oct 9, 2019
…ons (facebookarchive#1756) (facebookarchive#1931)

Summary:
**Summary**

Fixes facebookarchive#1756, and facebookarchive#1930. The tex and universal examples have their own dependencies, and relied on a different version of `react`/`react-dom` from the one defined for Draft.js. This caused a JS error when running the examples.

I have also added the missing lockfile for the universal example.

**Test Plan**

- Make a clean copy of the project
- For both examples, go through the instructions to install their dependencies and build them.
- Open the examples in a browser, and attempt to type in the editor(s)
Pull Request resolved: facebookarchive#1931

Differential Revision: D13019619

fbshipit-source-id: 3451737816a5ba9fe283cb65b285fd5fb5e5532a
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants