{"action":"created","issue":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/11965","repository_url":"https://api.github.com/repos/WordPress/gutenberg","labels_url":"https://api.github.com/repos/WordPress/gutenberg/issues/11965/labels{/name}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/11965/comments","events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/11965/events","html_url":"https://github.com/WordPress/gutenberg/pull/11965","id":381519602,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxNDY4NDM0","number":11965,"title":"RichText: fix caret position when deleting a selected word","user":{"login":"iseulde","id":4710635,"node_id":"MDQ6VXNlcjQ3MTA2MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/4710635?v=4","gravatar_id":"","url":"https://api.github.com/users/iseulde","html_url":"https://github.com/iseulde","followers_url":"https://api.github.com/users/iseulde/followers","following_url":"https://api.github.com/users/iseulde/following{/other_user}","gists_url":"https://api.github.com/users/iseulde/gists{/gist_id}","starred_url":"https://api.github.com/users/iseulde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iseulde/subscriptions","organizations_url":"https://api.github.com/users/iseulde/orgs","repos_url":"https://api.github.com/users/iseulde/repos","events_url":"https://api.github.com/users/iseulde/events{/privacy}","received_events_url":"https://api.github.com/users/iseulde/received_events","type":"User","site_admin":false},"labels":[{"id":732195375,"node_id":"MDU6TGFiZWw3MzIxOTUzNzU=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/Writing%20Flow","name":"Writing Flow","color":"9af4b8","default":false},{"id":598548627,"node_id":"MDU6TGFiZWw1OTg1NDg2Mjc=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/[Component]%20Rich%20Text","name":"[Component] Rich Text","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/WordPress/gutenberg/milestones/77","html_url":"https://github.com/WordPress/gutenberg/milestone/77","labels_url":"https://api.github.com/repos/WordPress/gutenberg/milestones/77/labels","id":3823975,"node_id":"MDk6TWlsZXN0b25lMzgyMzk3NQ==","number":77,"title":"4.5","description":"","creator":{"login":"youknowriad","id":272444,"node_id":"MDQ6VXNlcjI3MjQ0NA==","avatar_url":"https://avatars3.githubusercontent.com/u/272444?v=4","gravatar_id":"","url":"https://api.github.com/users/youknowriad","html_url":"https://github.com/youknowriad","followers_url":"https://api.github.com/users/youknowriad/followers","following_url":"https://api.github.com/users/youknowriad/following{/other_user}","gists_url":"https://api.github.com/users/youknowriad/gists{/gist_id}","starred_url":"https://api.github.com/users/youknowriad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youknowriad/subscriptions","organizations_url":"https://api.github.com/users/youknowriad/orgs","repos_url":"https://api.github.com/users/youknowriad/repos","events_url":"https://api.github.com/users/youknowriad/events{/privacy}","received_events_url":"https://api.github.com/users/youknowriad/received_events","type":"User","site_admin":false},"open_issues":48,"closed_issues":7,"state":"open","created_at":"2018-11-15T10:13:29Z","updated_at":"2018-11-16T11:59:43Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2018-11-16T09:38:35Z","updated_at":"2018-11-16T12:01:38Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/11965","html_url":"https://github.com/WordPress/gutenberg/pull/11965","diff_url":"https://github.com/WordPress/gutenberg/pull/11965.diff","patch_url":"https://github.com/WordPress/gutenberg/pull/11965.patch"},"body":"## Description\r\n\r\nFixes #11964 and adds e2e tests.\r\nAlso fixes an issue where CTRL+A wouldn't select all blocks if you first select all text in a rich text field by triple clicking and then pressing CTRL+A.\r\n\r\nIn #11627 I retained deletion handling for uncollapsed selections (meaning text is selected) because I couldn't figure out the problem fast enough with letting it be handled natively again. It turns out TinyMCE is handling the case where an instance is entirely selected, and the React `onKeyDown` event is only fired after the TinyMCE event, causing TinyMCE to delete the contents first, and then us thinking the field is empty and merging it with the neighbouring block. The solution is to prevent the TinyMCE behaviour in that case, and handle it ourselves.\r\n\r\n@notnownikki I also updated the tests you have added, to check if the space is actually there before retyping.\r\n\r\n## How has this been tested?\r\nSee #11964 and above.\r\n\r\n## Screenshots <!-- if applicable -->\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce?  -->\r\n<!-- Bug fix (non-breaking change which fixes an issue) -->\r\n<!-- New feature (non-breaking change which adds functionality) -->\r\n<!-- Breaking change (fix or feature that would cause existing functionality to not work as expected) -->\r\n\r\n## Checklist:\r\n- [x] My code is tested.\r\n- [x] My code follows the WordPress code style. <!-- Check code: `npm run lint`, Guidelines: https://make.wordpress.org/core/handbook/best-practices/coding-standards/javascript/ -->\r\n- [x] My code follows the accessibility standards. <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/coding-standards/accessibility-coding-standards/ -->\r\n- [x] My code has proper inline documentation. <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/ -->"},"comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments/439372903","html_url":"https://github.com/WordPress/gutenberg/pull/11965#issuecomment-439372903","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/11965","id":439372903,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTM3MjkwMw==","user":{"login":"iseulde","id":4710635,"node_id":"MDQ6VXNlcjQ3MTA2MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/4710635?v=4","gravatar_id":"","url":"https://api.github.com/users/iseulde","html_url":"https://github.com/iseulde","followers_url":"https://api.github.com/users/iseulde/followers","following_url":"https://api.github.com/users/iseulde/following{/other_user}","gists_url":"https://api.github.com/users/iseulde/gists{/gist_id}","starred_url":"https://api.github.com/users/iseulde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iseulde/subscriptions","organizations_url":"https://api.github.com/users/iseulde/orgs","repos_url":"https://api.github.com/users/iseulde/repos","events_url":"https://api.github.com/users/iseulde/events{/privacy}","received_events_url":"https://api.github.com/users/iseulde/received_events","type":"User","site_admin":false},"created_at":"2018-11-16T12:01:38Z","updated_at":"2018-11-16T12:01:38Z","author_association":"MEMBER","body":"Thanks for testing @notnownikki!"}}
{"actor":{"display_login":"iseulde"}}