Navigation Menu

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

Draft.js example crashes with Linux input method on Node.removeChild #3109

Open
wengxt opened this issue Feb 2, 2022 · 1 comment
Open

Comments

@wengxt
Copy link

wengxt commented Feb 2, 2022

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

Bug, might be a dup of #1320 , but I don't have mac so I can't confirm.

What is the current behavior?

If input method directly send commit string request (no preedit presents) with a empty editor, draft.js would just crash. For example, using Pinyin and press "." (period).

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

https://jsfiddle.net/gmertk/e61z7nfa/ this can be used to reproduce the bug.

1.mp4

If I add this to the editor class, it will reproduce exactly https://bugzilla.mozilla.org/show_bug.cgi?id=1735227.

    componentDidCatch() {
        this.forceUpdate();
    }
2.mp4

What is the expected behavior?

Text can be typed into the editor.

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?

Linux, draft.js 0.11.7, Fcitx/IBus, firefox 97
I believe this affects twitter.com / facebook.com 's post box.

@lilydjwg
Copy link

lilydjwg commented Feb 5, 2022

I just typed at https://draftjs.org/ and the whole page became blank....

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

2 participants