{"action":"created","issue":{"url":"https://api.github.com/repos/ianstormtaylor/slate/issues/2291","repository_url":"https://api.github.com/repos/ianstormtaylor/slate","labels_url":"https://api.github.com/repos/ianstormtaylor/slate/issues/2291/labels{/name}","comments_url":"https://api.github.com/repos/ianstormtaylor/slate/issues/2291/comments","events_url":"https://api.github.com/repos/ianstormtaylor/slate/issues/2291/events","html_url":"https://github.com/ianstormtaylor/slate/issues/2291","id":372366727,"node_id":"MDU6SXNzdWUzNzIzNjY3Mjc=","number":2291,"title":"Delete all will fail when there are three blocks or more","user":{"login":"skogsmaskin","id":373403,"node_id":"MDQ6VXNlcjM3MzQwMw==","avatar_url":"https://avatars1.githubusercontent.com/u/373403?v=4","gravatar_id":"","url":"https://api.github.com/users/skogsmaskin","html_url":"https://github.com/skogsmaskin","followers_url":"https://api.github.com/users/skogsmaskin/followers","following_url":"https://api.github.com/users/skogsmaskin/following{/other_user}","gists_url":"https://api.github.com/users/skogsmaskin/gists{/gist_id}","starred_url":"https://api.github.com/users/skogsmaskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skogsmaskin/subscriptions","organizations_url":"https://api.github.com/users/skogsmaskin/orgs","repos_url":"https://api.github.com/users/skogsmaskin/repos","events_url":"https://api.github.com/users/skogsmaskin/events{/privacy}","received_events_url":"https://api.github.com/users/skogsmaskin/received_events","type":"User","site_admin":false},"labels":[{"id":404055005,"node_id":"MDU6TGFiZWw0MDQwNTUwMDU=","url":"https://api.github.com/repos/ianstormtaylor/slate/labels/bug","name":"bug","color":"f9d0c4","default":true},{"id":404056337,"node_id":"MDU6TGFiZWw0MDQwNTYzMzc=","url":"https://api.github.com/repos/ianstormtaylor/slate/labels/%E2%99%A5%20help%20please","name":"♥ help please","color":"f2cee2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":28,"created_at":"2018-10-21T23:04:47Z","updated_at":"2018-10-25T18:38:40Z","closed_at":null,"author_association":"COLLABORATOR","body":"**EDIT**: previously this was only an issue when the last block ended in a inline void node. Now it is *always* an issue.\r\n\r\n#### Do you want to request a _feature_ or report a _bug_?\r\nBug\r\n<!-- \r\nIf you have a question, ask it in our Slack channel instead:\r\n\r\nhttps://slate-slack.herokuapp.com/\r\n-->\r\n\r\n#### What's the current behavior?\r\n\r\nIf you have three blocks or more, where the last block ends with an inline void node, and you select everything and hit backspace (delete), it will fail with error:\r\n```\r\nUncaught Error: `Node.assertNode` could not find node with path or key: List [ 1 ]\r\n```\r\n\r\n\r\n<!-- \r\nFor bugs, you **must** include the following: \r\n\r\n- A JSFiddle that minimally reproduces the issue.\r\n- A GIF showing the issue in action.\r\n- Information about your OS, browser, Slate version, etc.\r\n\r\nIf you don't include these, there's a very good chance your issue will be closed, because it's much too hard to figure out exactly what is going wrong, and it makes maintenance much harder.\r\n\r\nWe need to keep the issues actionable, or else maintaining Slate becomes overwhelming. Thank you for understanding!\r\n\r\nhttps://jsfiddle.net/fj9dvhom/1/\r\nhttp://recordit.co/\r\n-->\r\n\r\nReproduction:\r\n\r\n1) Goto the [emoji-example](https://www.slatejs.org/#/emojis)\r\n2) Add an emoji at the end of the last block. \r\n3) Select everything (command/ctrl-A)\r\n3) Hit backspace\r\n\r\n\r\n#### What's the expected behavior?\r\nThat everything will be deleted without error.\r\n\r\nI have noticed that when deleting all (and you have three or more blocks) the change will include an operation with type ``move_node`` where the path property is a block path (i.ie ``[2]`` with the same value as the newPath prop ``[2]``. I think Slate will regenerate keys for this operation and it may lead to issues.\r\n\r\n<!-- \r\nThe fastest, and most appreciated way to have your issue fixed is to create a pull request with working, tested code and we will help get it merged. Don't be scared to open a pull request that isn't completed and ask for input. We're happy to give direction! Also, researching how other editors handle this issue is super helpful.\r\n\r\nSlate is solving a pretty complex problem, and we can't do it without active contributors, so thank you so much for your help!\r\n\r\nhttps://draftjs.org/\r\nhttp://prosemirror.net/\r\nhttps://quilljs.com/\r\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/ianstormtaylor/slate/issues/comments/433160864","html_url":"https://github.com/ianstormtaylor/slate/issues/2291#issuecomment-433160864","issue_url":"https://api.github.com/repos/ianstormtaylor/slate/issues/2291","id":433160864,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzE2MDg2NA==","user":{"login":"skogsmaskin","id":373403,"node_id":"MDQ6VXNlcjM3MzQwMw==","avatar_url":"https://avatars1.githubusercontent.com/u/373403?v=4","gravatar_id":"","url":"https://api.github.com/users/skogsmaskin","html_url":"https://github.com/skogsmaskin","followers_url":"https://api.github.com/users/skogsmaskin/followers","following_url":"https://api.github.com/users/skogsmaskin/following{/other_user}","gists_url":"https://api.github.com/users/skogsmaskin/gists{/gist_id}","starred_url":"https://api.github.com/users/skogsmaskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skogsmaskin/subscriptions","organizations_url":"https://api.github.com/users/skogsmaskin/orgs","repos_url":"https://api.github.com/users/skogsmaskin/repos","events_url":"https://api.github.com/users/skogsmaskin/events{/privacy}","received_events_url":"https://api.github.com/users/skogsmaskin/received_events","type":"User","site_admin":false},"created_at":"2018-10-25T18:38:40Z","updated_at":"2018-10-25T18:38:40Z","author_association":"COLLABORATOR","body":"@ianstormtaylor \r\n\r\nhttps://github.com/ianstormtaylor/slate/pull/2324/files#diff-7e5c3b562666e6718badd20baadba246L344"}}
{"actor":{"display_login":"skogsmaskin"}}