-
Notifications
You must be signed in to change notification settings - Fork 674
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
Draft.js crashes when using typetext #2365
Comments
The changes from @AlexKamaev linked in the issue #1956 seem to fix this issue as well. The only issue that than remains is that the whitespace between Hello and World is omitted. |
I'll investigate it |
I've reproduced it |
An update from my side using testcafe with your current fixes
Thanks for investigating. If I can help, let me know |
@MichaReiser I've fixed the issues with Chrome, IE and Edge, but could not reproduce the issues with Firefox |
Thank's Alex. Maybe you already fixed it in an earlier version? If I change the test to use paste then the result using the latest testcafe version and firefox is fixture("Draft.js").page("https://draftjs.org/");
test("Can type into the draftjs editor", async t => {
await t.typeText(".public-DraftStyleDefault-block", "Hello World", { paste: true })
}); |
Now I see. It is reproduced only when with |
@MichaReiser I've researched the issue with duplicating the first symbol and found that it occurs due to limited support for the 'paste' operation. The 'onpaste' event is not raised, so Draft.js mechanisms could not process typing correctly. We already have an issue with the 'onpaste' event reported in our database, please refer to #2075. As a workaround I recommend you to remove |
Thank you @AlexKamaev. Removing paste here is a valid workaround. Nevertheless, I'm looking forward to the support of the on paste event since typing a complete article takes its time ;) |
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow. |
Are you requesting a feature or reporting a bug?
bug
What is the current behavior?
Using
typeText
to write in the draft.js editor results in a draft.js editor error. It works fine with FirefError printed on console
What is the expected behavior?
Hello World is written to the draft.js editor
How would you reproduce the current behavior (if this is a bug)?
Run the test code below.
Provide the test code and the tested page URL (if applicable)
Tested page URL: https://draftjs.org
Test code
Specify your
The text was updated successfully, but these errors were encountered: