{"action":"opened","number":383,"pull_request":{"url":"https://api.github.com/repos/ianstormtaylor/slate/pulls/383","id":89242100,"html_url":"https://github.com/ianstormtaylor/slate/pull/383","diff_url":"https://github.com/ianstormtaylor/slate/pull/383.diff","patch_url":"https://github.com/ianstormtaylor/slate/pull/383.patch","issue_url":"https://api.github.com/repos/ianstormtaylor/slate/issues/383","number":383,"state":"open","locked":false,"title":"Slow renderer causes double-click selection to break","user":{"login":"arekkas","id":3372410,"avatar_url":"https://avatars.githubusercontent.com/u/3372410?v=3","gravatar_id":"","url":"https://api.github.com/users/arekkas","html_url":"https://github.com/arekkas","followers_url":"https://api.github.com/users/arekkas/followers","following_url":"https://api.github.com/users/arekkas/following{/other_user}","gists_url":"https://api.github.com/users/arekkas/gists{/gist_id}","starred_url":"https://api.github.com/users/arekkas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arekkas/subscriptions","organizations_url":"https://api.github.com/users/arekkas/orgs","repos_url":"https://api.github.com/users/arekkas/repos","events_url":"https://api.github.com/users/arekkas/events{/privacy}","received_events_url":"https://api.github.com/users/arekkas/received_events","type":"User","site_admin":false},"body":"At the moment, [onSelect](https://github.com/arekkas/slate/blob/e367326618ec62f64ee914e802f0fdf2a1d58886/src/components/content.js#L559-L566) is aborting if `this.tmp.isRendering` is true. This results in buggy behaviour if the rendering method is slow. For demonstration purposes, I created this PR. To get the buggy behaviour, uncomment [this line](https://github.com/arekkas/slate/blob/e367326618ec62f64ee914e802f0fdf2a1d58886/src/components/content.js#L563), re-build everything (libs and examples) and double-click on some word in the editing area.\r\n\r\nAdditionally, I created two screencasts which show the problem.\r\n\r\nWith `this.tmp.isRendering` check in `onSelect`:\r\n\r\n![http://g.recordit.co/cg9kTxLzKk.gif](http://g.recordit.co/cg9kTxLzKk.gif)\r\n\r\nWithout `this.tmp.isRendering` check in `onSelect`:\r\n\r\n![http://g.recordit.co/Uh2vtslbcl.gif](http://g.recordit.co/Uh2vtslbcl.gif)\r\n\r\nI don't know what the reasoning behind this check was. If it is ok to remove it, I will clean up this PR and propose a fix.","created_at":"2016-10-13T16:58:29Z","updated_at":"2016-10-13T16:58:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d672ed31f9e326a321137aef8f00c0fb8a4f6ed","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ianstormtaylor/slate/pulls/383/commits","review_comments_url":"https://api.github.com/repos/ianstormtaylor/slate/pulls/383/comments","review_comment_url":"https://api.github.com/repos/ianstormtaylor/slate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ianstormtaylor/slate/issues/383/comments","statuses_url":"https://api.github.com/repos/ianstormtaylor/slate/statuses/e367326618ec62f64ee914e802f0fdf2a1d58886","head":{"label":"arekkas:example-slow-renderer","ref":"example-slow-renderer","sha":"e367326618ec62f64ee914e802f0fdf2a1d58886","user":{"login":"arekkas","id":3372410,"avatar_url":"https://avatars.githubusercontent.com/u/3372410?v=3","gravatar_id":"","url":"https://api.github.com/users/arekkas","html_url":"https://github.com/arekkas","followers_url":"https://api.github.com/users/arekkas/followers","following_url":"https://api.github.com/users/arekkas/following{/other_user}","gists_url":"https://api.github.com/users/arekkas/gists{/gist_id}","starred_url":"https://api.github.com/users/arekkas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arekkas/subscriptions","organizations_url":"https://api.github.com/users/arekkas/orgs","repos_url":"https://api.github.com/users/arekkas/repos","events_url":"https://api.github.com/users/arekkas/events{/privacy}","received_events_url":"https://api.github.com/users/arekkas/received_events","type":"User","site_admin":false},"repo":{"id":64089018,"name":"slate","full_name":"arekkas/slate","owner":{"login":"arekkas","id":3372410,"avatar_url":"https://avatars.githubusercontent.com/u/3372410?v=3","gravatar_id":"","url":"https://api.github.com/users/arekkas","html_url":"https://github.com/arekkas","followers_url":"https://api.github.com/users/arekkas/followers","following_url":"https://api.github.com/users/arekkas/following{/other_user}","gists_url":"https://api.github.com/users/arekkas/gists{/gist_id}","starred_url":"https://api.github.com/users/arekkas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arekkas/subscriptions","organizations_url":"https://api.github.com/users/arekkas/orgs","repos_url":"https://api.github.com/users/arekkas/repos","events_url":"https://api.github.com/users/arekkas/events{/privacy}","received_events_url":"https://api.github.com/users/arekkas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arekkas/slate","description":"A completely customizable framework for building rich text editors.","fork":true,"url":"https://api.github.com/repos/arekkas/slate","forks_url":"https://api.github.com/repos/arekkas/slate/forks","keys_url":"https://api.github.com/repos/arekkas/slate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arekkas/slate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arekkas/slate/teams","hooks_url":"https://api.github.com/repos/arekkas/slate/hooks","issue_events_url":"https://api.github.com/repos/arekkas/slate/issues/events{/number}","events_url":"https://api.github.com/repos/arekkas/slate/events","assignees_url":"https://api.github.com/repos/arekkas/slate/assignees{/user}","branches_url":"https://api.github.com/repos/arekkas/slate/branches{/branch}","tags_url":"https://api.github.com/repos/arekkas/slate/tags","blobs_url":"https://api.github.com/repos/arekkas/slate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arekkas/slate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arekkas/slate/git/refs{/sha}","trees_url":"https://api.github.com/repos/arekkas/slate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arekkas/slate/statuses/{sha}","languages_url":"https://api.github.com/repos/arekkas/slate/languages","stargazers_url":"https://api.github.com/repos/arekkas/slate/stargazers","contributors_url":"https://api.github.com/repos/arekkas/slate/contributors","subscribers_url":"https://api.github.com/repos/arekkas/slate/subscribers","subscription_url":"https://api.github.com/repos/arekkas/slate/subscription","commits_url":"https://api.github.com/repos/arekkas/slate/commits{/sha}","git_commits_url":"https://api.github.com/repos/arekkas/slate/git/commits{/sha}","comments_url":"https://api.github.com/repos/arekkas/slate/comments{/number}","issue_comment_url":"https://api.github.com/repos/arekkas/slate/issues/comments{/number}","contents_url":"https://api.github.com/repos/arekkas/slate/contents/{+path}","compare_url":"https://api.github.com/repos/arekkas/slate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arekkas/slate/merges","archive_url":"https://api.github.com/repos/arekkas/slate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arekkas/slate/downloads","issues_url":"https://api.github.com/repos/arekkas/slate/issues{/number}","pulls_url":"https://api.github.com/repos/arekkas/slate/pulls{/number}","milestones_url":"https://api.github.com/repos/arekkas/slate/milestones{/number}","notifications_url":"https://api.github.com/repos/arekkas/slate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arekkas/slate/labels{/name}","releases_url":"https://api.github.com/repos/arekkas/slate/releases{/id}","deployments_url":"https://api.github.com/repos/arekkas/slate/deployments","created_at":"2016-07-24T22:47:28Z","updated_at":"2016-07-24T22:47:30Z","pushed_at":"2016-10-13T16:52:08Z","git_url":"git://github.com/arekkas/slate.git","ssh_url":"git@github.com:arekkas/slate.git","clone_url":"https://github.com/arekkas/slate.git","svn_url":"https://github.com/arekkas/slate","homepage":"http://slatejs.org","size":13786,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ianstormtaylor:master","ref":"master","sha":"b7eb15dfad585aba78ba97dbfe9bf44f357ce231","user":{"login":"ianstormtaylor","id":311752,"avatar_url":"https://avatars.githubusercontent.com/u/311752?v=3","gravatar_id":"","url":"https://api.github.com/users/ianstormtaylor","html_url":"https://github.com/ianstormtaylor","followers_url":"https://api.github.com/users/ianstormtaylor/followers","following_url":"https://api.github.com/users/ianstormtaylor/following{/other_user}","gists_url":"https://api.github.com/users/ianstormtaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/ianstormtaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianstormtaylor/subscriptions","organizations_url":"https://api.github.com/users/ianstormtaylor/orgs","repos_url":"https://api.github.com/users/ianstormtaylor/repos","events_url":"https://api.github.com/users/ianstormtaylor/events{/privacy}","received_events_url":"https://api.github.com/users/ianstormtaylor/received_events","type":"User","site_admin":false},"repo":{"id":61412022,"name":"slate","full_name":"ianstormtaylor/slate","owner":{"login":"ianstormtaylor","id":311752,"avatar_url":"https://avatars.githubusercontent.com/u/311752?v=3","gravatar_id":"","url":"https://api.github.com/users/ianstormtaylor","html_url":"https://github.com/ianstormtaylor","followers_url":"https://api.github.com/users/ianstormtaylor/followers","following_url":"https://api.github.com/users/ianstormtaylor/following{/other_user}","gists_url":"https://api.github.com/users/ianstormtaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/ianstormtaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianstormtaylor/subscriptions","organizations_url":"https://api.github.com/users/ianstormtaylor/orgs","repos_url":"https://api.github.com/users/ianstormtaylor/repos","events_url":"https://api.github.com/users/ianstormtaylor/events{/privacy}","received_events_url":"https://api.github.com/users/ianstormtaylor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ianstormtaylor/slate","description":"A completely customizable framework for building rich text editors.","fork":false,"url":"https://api.github.com/repos/ianstormtaylor/slate","forks_url":"https://api.github.com/repos/ianstormtaylor/slate/forks","keys_url":"https://api.github.com/repos/ianstormtaylor/slate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ianstormtaylor/slate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ianstormtaylor/slate/teams","hooks_url":"https://api.github.com/repos/ianstormtaylor/slate/hooks","issue_events_url":"https://api.github.com/repos/ianstormtaylor/slate/issues/events{/number}","events_url":"https://api.github.com/repos/ianstormtaylor/slate/events","assignees_url":"https://api.github.com/repos/ianstormtaylor/slate/assignees{/user}","branches_url":"https://api.github.com/repos/ianstormtaylor/slate/branches{/branch}","tags_url":"https://api.github.com/repos/ianstormtaylor/slate/tags","blobs_url":"https://api.github.com/repos/ianstormtaylor/slate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ianstormtaylor/slate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ianstormtaylor/slate/git/refs{/sha}","trees_url":"https://api.github.com/repos/ianstormtaylor/slate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ianstormtaylor/slate/statuses/{sha}","languages_url":"https://api.github.com/repos/ianstormtaylor/slate/languages","stargazers_url":"https://api.github.com/repos/ianstormtaylor/slate/stargazers","contributors_url":"https://api.github.com/repos/ianstormtaylor/slate/contributors","subscribers_url":"https://api.github.com/repos/ianstormtaylor/slate/subscribers","subscription_url":"https://api.github.com/repos/ianstormtaylor/slate/subscription","commits_url":"https://api.github.com/repos/ianstormtaylor/slate/commits{/sha}","git_commits_url":"https://api.github.com/repos/ianstormtaylor/slate/git/commits{/sha}","comments_url":"https://api.github.com/repos/ianstormtaylor/slate/comments{/number}","issue_comment_url":"https://api.github.com/repos/ianstormtaylor/slate/issues/comments{/number}","contents_url":"https://api.github.com/repos/ianstormtaylor/slate/contents/{+path}","compare_url":"https://api.github.com/repos/ianstormtaylor/slate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ianstormtaylor/slate/merges","archive_url":"https://api.github.com/repos/ianstormtaylor/slate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ianstormtaylor/slate/downloads","issues_url":"https://api.github.com/repos/ianstormtaylor/slate/issues{/number}","pulls_url":"https://api.github.com/repos/ianstormtaylor/slate/pulls{/number}","milestones_url":"https://api.github.com/repos/ianstormtaylor/slate/milestones{/number}","notifications_url":"https://api.github.com/repos/ianstormtaylor/slate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ianstormtaylor/slate/labels{/name}","releases_url":"https://api.github.com/repos/ianstormtaylor/slate/releases{/id}","deployments_url":"https://api.github.com/repos/ianstormtaylor/slate/deployments","created_at":"2016-06-18T01:52:42Z","updated_at":"2016-10-12T17:45:34Z","pushed_at":"2016-10-13T16:58:29Z","git_url":"git://github.com/ianstormtaylor/slate.git","ssh_url":"git@github.com:ianstormtaylor/slate.git","clone_url":"https://github.com/ianstormtaylor/slate.git","svn_url":"https://github.com/ianstormtaylor/slate","homepage":"http://slatejs.org","size":26232,"stargazers_count":2497,"watchers_count":2497,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":95,"mirror_url":null,"open_issues_count":59,"forks":95,"open_issues":59,"watchers":2497,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ianstormtaylor/slate/pulls/383"},"html":{"href":"https://github.com/ianstormtaylor/slate/pull/383"},"issue":{"href":"https://api.github.com/repos/ianstormtaylor/slate/issues/383"},"comments":{"href":"https://api.github.com/repos/ianstormtaylor/slate/issues/383/comments"},"review_comments":{"href":"https://api.github.com/repos/ianstormtaylor/slate/pulls/383/comments"},"review_comment":{"href":"https://api.github.com/repos/ianstormtaylor/slate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ianstormtaylor/slate/pulls/383/commits"},"statuses":{"href":"https://api.github.com/repos/ianstormtaylor/slate/statuses/e367326618ec62f64ee914e802f0fdf2a1d58886"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":14,"deletions":3,"changed_files":2}}
{"actor":{"display_login":"arekkas"}}