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.

Chinese IME throws out errors

See original GitHub issue

I want to report a bug?

What’s the current behavior?

Using Chinese IME on slatejs.org throws out errors

Error: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
    at removeChild (http://slatejs.org/build.prod.js:4828:7974)
    at a (http://slatejs.org/build.prod.js:4825:25233)
    at commitDeletion (http://slatejs.org/build.prod.js:4825:26981)
    at n (http://slatejs.org/build.prod.js:4825:31488)
    at u (http://slatejs.org/build.prod.js:4826:1356)
    at c (http://slatejs.org/build.prod.js:4826:1793)
    at batchedUpdates (http://slatejs.org/build.prod.js:4826:4655)
    at qb (http://slatejs.org/build.prod.js:4825:3879)
    at ob (http://slatejs.org/build.prod.js:4825:3813)
    at Object.batchedUpdates (http://slatejs.org/build.prod.js:4826:19682)

1

TypeError: Cannot read property 'node' of null
    at t.n.updateSelection (http://slatejs.org/build.prod.js:5014:4115)
    at t.n.componentDidUpdate (http://slatejs.org/build.prod.js:5014:3374)
    at commitLifeCycles (http://slatejs.org/build.prod.js:4825:27709)
    at n (http://slatejs.org/build.prod.js:4825:31692)
    at u (http://slatejs.org/build.prod.js:4826:1356)
    at c (http://slatejs.org/build.prod.js:4826:1793)
    at batchedUpdates (http://slatejs.org/build.prod.js:4826:4655)
    at qb (http://slatejs.org/build.prod.js:4825:3879)
    at ob (http://slatejs.org/build.prod.js:4825:3813)
    at Object.batchedUpdates (http://slatejs.org/build.prod.js:4826:19682)

2

OS: macOS High Sierra Browser: Chrome version 61 Slate version: slatejs.org

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
chemzqmcommented, Oct 27, 2017

The error is caused by the <br> added by slate https://github.com/ianstormtaylor/slate/blob/master/packages/slate-react/src/components/leaf.js#L130

It looks like some browser would remove <br> after IME complete, so react could not find it and throw error. One solution is use a whitespace instead:

    if (text == '' && parent.kind == 'block' && parent.text == '') return '\u2060'
0reactions
zhengjunxincommented, Nov 22, 2018

@chemzqm Is add that code in the renderText method like this? image However, it still crash after inputting Chinese

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chinese IME dictionaries are not ready yet - Windows
The issue occurs because the Chinese IME dictionaries are included in the basic typing package of Features on Demand (FODs) instead of Windows...
Read more >
How can solveTraditional Chinese IME is not ready yetthis ...
The error message is “Traditional Chinese IME is not ready yet”. Any ideas? I don't think it is related to any language pack...
Read more >
defaultHighlightStyle and markdown cause IME error when ...
To answer your question: I am using MacOS 11.4, Chrome and Safari (both browsers reproduce the bug), and system built-in IME for Chinese...
Read more >
Bugs happen when typing Chinese words in Editor and UI
Step9: click somewhere else, Unity will throw an Invalid Operation Exception error in the console and the texts in the Input Field glitches...
Read more >
Fixing Japanese and Chinese IME problem [EN] - /w/root
From my understanding the “Japanese IME is not ready yet.” (or Chinese) error started appearing sometime around 1903 was released.
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