{"action":"created","comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments/211139964","pull_request_review_id":147499720,"id":211139964,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTEzOTk2NA==","diff_hunk":"@@ -231,7 +231,11 @@ class WritingFlow extends Component {\n \t\t\t\t}\n \n \t\t\t\t// Set in case the meta key doesn't get released.\n-\t\t\t\tthis.isEntirelySelected = isEntirelySelected( target );\n+\t\t\t\t// TinyMCE makes sure all content of the editable is select,\n+\t\t\t\t// but on some browsers (safari and firefox) calling isEntirelySelected right way still returns false.\n+\t\t\t\t// So to make sure we are compatible with this browsers we set is entirely selected to true\n+\t\t\t\t// after the first meta+a keypress assuming TinyMCE will make all content entirely selected.\n+\t\t\t\tthis.isEntirelySelected = target.isContentEditable ? true : isEntirelySelected( target );","path":"packages/editor/src/components/writing-flow/index.js","position":9,"original_position":9,"commit_id":"0372e3496a6dfeb862685c5b34ccc3adb22c64d7","original_commit_id":"0372e3496a6dfeb862685c5b34ccc3adb22c64d7","user":{"login":"noisysocks","id":612155,"node_id":"MDQ6VXNlcjYxMjE1NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/612155?v=4","gravatar_id":"","url":"https://api.github.com/users/noisysocks","html_url":"https://github.com/noisysocks","followers_url":"https://api.github.com/users/noisysocks/followers","following_url":"https://api.github.com/users/noisysocks/following{/other_user}","gists_url":"https://api.github.com/users/noisysocks/gists{/gist_id}","starred_url":"https://api.github.com/users/noisysocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noisysocks/subscriptions","organizations_url":"https://api.github.com/users/noisysocks/orgs","repos_url":"https://api.github.com/users/noisysocks/repos","events_url":"https://api.github.com/users/noisysocks/events{/privacy}","received_events_url":"https://api.github.com/users/noisysocks/received_events","type":"User","site_admin":false},"body":"I'm trying to wrap my head around this logic. When would primary+a **not** result in all of the text being selected? In other words, why can't this line be:\r\n\r\n```js\r\nthis.isEntirelySelected = true;\r\n```","created_at":"2018-08-20T04:44:07Z","updated_at":"2018-08-20T04:45:53Z","html_url":"https://github.com/WordPress/gutenberg/pull/8180#discussion_r211139964","pull_request_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/8180","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments/211139964"},"html":{"href":"https://github.com/WordPress/gutenberg/pull/8180#discussion_r211139964"},"pull_request":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/8180"}}},"pull_request":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/8180","id":203629944,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNjI5OTQ0","html_url":"https://github.com/WordPress/gutenberg/pull/8180","diff_url":"https://github.com/WordPress/gutenberg/pull/8180.diff","patch_url":"https://github.com/WordPress/gutenberg/pull/8180.patch","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/8180","number":8180,"state":"open","locked":false,"title":"Fix: make meta+A behaviour of selecting all blocks work on safari and firefox","user":{"login":"jorgefilipecosta","id":11271197,"node_id":"MDQ6VXNlcjExMjcxMTk3","avatar_url":"https://avatars1.githubusercontent.com/u/11271197?v=4","gravatar_id":"","url":"https://api.github.com/users/jorgefilipecosta","html_url":"https://github.com/jorgefilipecosta","followers_url":"https://api.github.com/users/jorgefilipecosta/followers","following_url":"https://api.github.com/users/jorgefilipecosta/following{/other_user}","gists_url":"https://api.github.com/users/jorgefilipecosta/gists{/gist_id}","starred_url":"https://api.github.com/users/jorgefilipecosta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorgefilipecosta/subscriptions","organizations_url":"https://api.github.com/users/jorgefilipecosta/orgs","repos_url":"https://api.github.com/users/jorgefilipecosta/repos","events_url":"https://api.github.com/users/jorgefilipecosta/events{/privacy}","received_events_url":"https://api.github.com/users/jorgefilipecosta/received_events","type":"User","site_admin":false},"body":"On safari and firefox isEntirelySelected( target ) called right after meta+A event is fired when meta key is not released in the middle returns false but the content gets selected anyway.\r\nIf the target is editable it is safe to assume TinyMCE will make sure all content gets selected so in this cases we set the value to true without calling isEntirelySelected.\r\n\r\nFixes: https://github.com/WordPress/gutenberg/issues/7445\r\n\r\n## How has this been tested?\r\nI added some paragraphs.\r\nOn safari and firefox, I checked that when we press meta+A in paragraph two times all the blocks get selected.\r\n","created_at":"2018-07-24T19:26:21Z","updated_at":"2018-08-20T04:45:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2990c0a11322f7be056b02e41307578722e955c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":531680823,"node_id":"MDU6TGFiZWw1MzE2ODA4MjM=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/[Type]%20Bug","name":"[Type] Bug","color":"d93f0b","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/8180/commits","review_comments_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/8180/comments","review_comment_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/8180/comments","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/0372e3496a6dfeb862685c5b34ccc3adb22c64d7","head":{"label":"WordPress:fix/meta-A-select-all-blocks-accross-browsers","ref":"fix/meta-A-select-all-blocks-accross-browsers","sha":"0372e3496a6dfeb862685c5b34ccc3adb22c64d7","user":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"repo":{"id":80862584,"node_id":"MDEwOlJlcG9zaXRvcnk4MDg2MjU4NA==","name":"gutenberg","full_name":"WordPress/gutenberg","owner":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WordPress/gutenberg","description":"Printing since 1440. Development hub for the editor focus in core. Beta plugin is available from the official WordPress repository.","fork":false,"url":"https://api.github.com/repos/WordPress/gutenberg","forks_url":"https://api.github.com/repos/WordPress/gutenberg/forks","keys_url":"https://api.github.com/repos/WordPress/gutenberg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WordPress/gutenberg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WordPress/gutenberg/teams","hooks_url":"https://api.github.com/repos/WordPress/gutenberg/hooks","issue_events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/events{/number}","events_url":"https://api.github.com/repos/WordPress/gutenberg/events","assignees_url":"https://api.github.com/repos/WordPress/gutenberg/assignees{/user}","branches_url":"https://api.github.com/repos/WordPress/gutenberg/branches{/branch}","tags_url":"https://api.github.com/repos/WordPress/gutenberg/tags","blobs_url":"https://api.github.com/repos/WordPress/gutenberg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WordPress/gutenberg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WordPress/gutenberg/git/refs{/sha}","trees_url":"https://api.github.com/repos/WordPress/gutenberg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/{sha}","languages_url":"https://api.github.com/repos/WordPress/gutenberg/languages","stargazers_url":"https://api.github.com/repos/WordPress/gutenberg/stargazers","contributors_url":"https://api.github.com/repos/WordPress/gutenberg/contributors","subscribers_url":"https://api.github.com/repos/WordPress/gutenberg/subscribers","subscription_url":"https://api.github.com/repos/WordPress/gutenberg/subscription","commits_url":"https://api.github.com/repos/WordPress/gutenberg/commits{/sha}","git_commits_url":"https://api.github.com/repos/WordPress/gutenberg/git/commits{/sha}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/comments{/number}","issue_comment_url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments{/number}","contents_url":"https://api.github.com/repos/WordPress/gutenberg/contents/{+path}","compare_url":"https://api.github.com/repos/WordPress/gutenberg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WordPress/gutenberg/merges","archive_url":"https://api.github.com/repos/WordPress/gutenberg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WordPress/gutenberg/downloads","issues_url":"https://api.github.com/repos/WordPress/gutenberg/issues{/number}","pulls_url":"https://api.github.com/repos/WordPress/gutenberg/pulls{/number}","milestones_url":"https://api.github.com/repos/WordPress/gutenberg/milestones{/number}","notifications_url":"https://api.github.com/repos/WordPress/gutenberg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WordPress/gutenberg/labels{/name}","releases_url":"https://api.github.com/repos/WordPress/gutenberg/releases{/id}","deployments_url":"https://api.github.com/repos/WordPress/gutenberg/deployments","created_at":"2017-02-03T19:34:19Z","updated_at":"2018-08-20T03:30:57Z","pushed_at":"2018-08-20T04:04:39Z","git_url":"git://github.com/WordPress/gutenberg.git","ssh_url":"git@github.com:WordPress/gutenberg.git","clone_url":"https://github.com/WordPress/gutenberg.git","svn_url":"https://github.com/WordPress/gutenberg","homepage":"https://wordpress.org/plugins/gutenberg/ ","size":21120,"stargazers_count":3059,"watchers_count":3059,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":801,"mirror_url":null,"archived":false,"open_issues_count":1278,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":801,"open_issues":1278,"watchers":3059,"default_branch":"master"}},"base":{"label":"WordPress:master","ref":"master","sha":"f9da76a18f1dda3b0aaa00218b49914901c6ab0e","user":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"repo":{"id":80862584,"node_id":"MDEwOlJlcG9zaXRvcnk4MDg2MjU4NA==","name":"gutenberg","full_name":"WordPress/gutenberg","owner":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WordPress/gutenberg","description":"Printing since 1440. Development hub for the editor focus in core. Beta plugin is available from the official WordPress repository.","fork":false,"url":"https://api.github.com/repos/WordPress/gutenberg","forks_url":"https://api.github.com/repos/WordPress/gutenberg/forks","keys_url":"https://api.github.com/repos/WordPress/gutenberg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WordPress/gutenberg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WordPress/gutenberg/teams","hooks_url":"https://api.github.com/repos/WordPress/gutenberg/hooks","issue_events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/events{/number}","events_url":"https://api.github.com/repos/WordPress/gutenberg/events","assignees_url":"https://api.github.com/repos/WordPress/gutenberg/assignees{/user}","branches_url":"https://api.github.com/repos/WordPress/gutenberg/branches{/branch}","tags_url":"https://api.github.com/repos/WordPress/gutenberg/tags","blobs_url":"https://api.github.com/repos/WordPress/gutenberg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WordPress/gutenberg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WordPress/gutenberg/git/refs{/sha}","trees_url":"https://api.github.com/repos/WordPress/gutenberg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/{sha}","languages_url":"https://api.github.com/repos/WordPress/gutenberg/languages","stargazers_url":"https://api.github.com/repos/WordPress/gutenberg/stargazers","contributors_url":"https://api.github.com/repos/WordPress/gutenberg/contributors","subscribers_url":"https://api.github.com/repos/WordPress/gutenberg/subscribers","subscription_url":"https://api.github.com/repos/WordPress/gutenberg/subscription","commits_url":"https://api.github.com/repos/WordPress/gutenberg/commits{/sha}","git_commits_url":"https://api.github.com/repos/WordPress/gutenberg/git/commits{/sha}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/comments{/number}","issue_comment_url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments{/number}","contents_url":"https://api.github.com/repos/WordPress/gutenberg/contents/{+path}","compare_url":"https://api.github.com/repos/WordPress/gutenberg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WordPress/gutenberg/merges","archive_url":"https://api.github.com/repos/WordPress/gutenberg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WordPress/gutenberg/downloads","issues_url":"https://api.github.com/repos/WordPress/gutenberg/issues{/number}","pulls_url":"https://api.github.com/repos/WordPress/gutenberg/pulls{/number}","milestones_url":"https://api.github.com/repos/WordPress/gutenberg/milestones{/number}","notifications_url":"https://api.github.com/repos/WordPress/gutenberg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WordPress/gutenberg/labels{/name}","releases_url":"https://api.github.com/repos/WordPress/gutenberg/releases{/id}","deployments_url":"https://api.github.com/repos/WordPress/gutenberg/deployments","created_at":"2017-02-03T19:34:19Z","updated_at":"2018-08-20T03:30:57Z","pushed_at":"2018-08-20T04:04:39Z","git_url":"git://github.com/WordPress/gutenberg.git","ssh_url":"git@github.com:WordPress/gutenberg.git","clone_url":"https://github.com/WordPress/gutenberg.git","svn_url":"https://github.com/WordPress/gutenberg","homepage":"https://wordpress.org/plugins/gutenberg/ ","size":21120,"stargazers_count":3059,"watchers_count":3059,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":801,"mirror_url":null,"archived":false,"open_issues_count":1278,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":801,"open_issues":1278,"watchers":3059,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/8180"},"html":{"href":"https://github.com/WordPress/gutenberg/pull/8180"},"issue":{"href":"https://api.github.com/repos/WordPress/gutenberg/issues/8180"},"comments":{"href":"https://api.github.com/repos/WordPress/gutenberg/issues/8180/comments"},"review_comments":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/8180/comments"},"review_comment":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/8180/commits"},"statuses":{"href":"https://api.github.com/repos/WordPress/gutenberg/statuses/0372e3496a6dfeb862685c5b34ccc3adb22c64d7"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"noisysocks"}}