Skip to content
This repository has been archived by the owner on Nov 4, 2021. It is now read-only.

On android chrome deleting all content in editor causes crash #91

Open
PatrickTelfer opened this issue Sep 30, 2020 · 0 comments
Open

Comments

@PatrickTelfer
Copy link

PatrickTelfer commented Sep 30, 2020

Describe the bug
On android chrome deleting all content causes crash
Uncaught Error: Unable to find a DOM node for "2". This is often because of forgetting to add props.attributes to a custom component.

To Reproduce
Steps to reproduce the behavior:

  1. Clone and start the example at https://github.com/nossas/slate-editor/tree/develop/packages/slate-editor-example
  2. Open the app on an android device on google chrome as described in the mobile section
  3. Delete all the content in the editor
  4. Observe error

Expected behavior
Does not crash when the editor has been cleared on android chrome.

Screenshots
chrome_2020-09-30_11-13-08

Smartphone (please complete the following information):

  • Device: Samsung Galaxy S8
  • OS: Android 8.0
  • Browser chrome
  • Version 85.0.4183.127

Additional context
Using remote debugging, I was able to determine that the span with data-key=2 is being deleted from the DOM when the editor is cleared and as a result we get the error.

chrome_2020-09-30_11-17-05
chrome_2020-09-30_11-18-41

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

1 participant