{"action":"created","comment":{"url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/comments/105540489","pull_request_review_id":26429637,"id":105540489,"diff_hunk":"@@ -280,20 +280,28 @@ const Editor = React.createClass({\n     const { selectedToken } = this.state;\n     const cm = this.editor.codeMirror;\n     const token = e.target;\n+    const tokenText = token.innerText;\n \n-    if (!selectedFrame || !selectedToken ||\n-        !sourceText || !isEnabled(\"editorPreview\")) {\n+    if (!selectedFrame || !sourceText || !isEnabled(\"editorPreview\")) {\n       return;\n     }\n \n-    selectedToken.classList.remove(\"selected-token\");\n+    if (selectedToken) {\n+      selectedToken.classList.remove(\"selected-token\");\n+    }","path":"src/components/Editor/index.js","position":24,"original_position":24,"commit_id":"61a94d0ffdd80f771ec5b7b1d63b443db0299aa0","original_commit_id":"61a94d0ffdd80f771ec5b7b1d63b443db0299aa0","user":{"login":"bomsy","id":792924,"avatar_url":"https://avatars3.githubusercontent.com/u/792924?v=3","gravatar_id":"","url":"https://api.github.com/users/bomsy","html_url":"https://github.com/bomsy","followers_url":"https://api.github.com/users/bomsy/followers","following_url":"https://api.github.com/users/bomsy/following{/other_user}","gists_url":"https://api.github.com/users/bomsy/gists{/gist_id}","starred_url":"https://api.github.com/users/bomsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bomsy/subscriptions","organizations_url":"https://api.github.com/users/bomsy/orgs","repos_url":"https://api.github.com/users/bomsy/repos","events_url":"https://api.github.com/users/bomsy/events{/privacy}","received_events_url":"https://api.github.com/users/bomsy/received_events","type":"User","site_admin":false},"body":"adding `this.setState({ selectedToken: null });` above this line fixes the Popover not getting removed for the previous element.","created_at":"2017-03-11T19:38:43Z","updated_at":"2017-03-11T19:38:43Z","html_url":"https://github.com/devtools-html/debugger.html/pull/2340#discussion_r105540489","pull_request_url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/2340","_links":{"self":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/comments/105540489"},"html":{"href":"https://github.com/devtools-html/debugger.html/pull/2340#discussion_r105540489"},"pull_request":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/2340"}}},"pull_request":{"url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/2340","id":110269005,"html_url":"https://github.com/devtools-html/debugger.html/pull/2340","diff_url":"https://github.com/devtools-html/debugger.html/pull/2340.diff","patch_url":"https://github.com/devtools-html/debugger.html/pull/2340.patch","issue_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/2340","number":2340,"state":"open","locked":false,"title":"show `this` when it’s in scope","user":{"login":"jcreighton","id":5232812,"avatar_url":"https://avatars1.githubusercontent.com/u/5232812?v=3","gravatar_id":"","url":"https://api.github.com/users/jcreighton","html_url":"https://github.com/jcreighton","followers_url":"https://api.github.com/users/jcreighton/followers","following_url":"https://api.github.com/users/jcreighton/following{/other_user}","gists_url":"https://api.github.com/users/jcreighton/gists{/gist_id}","starred_url":"https://api.github.com/users/jcreighton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcreighton/subscriptions","organizations_url":"https://api.github.com/users/jcreighton/orgs","repos_url":"https://api.github.com/users/jcreighton/repos","events_url":"https://api.github.com/users/jcreighton/events{/privacy}","received_events_url":"https://api.github.com/users/jcreighton/received_events","type":"User","site_admin":false},"body":"Associated Issue: #2300\r\n\r\n### Summary of Changes\r\n\r\n* EditorPreview now appears when `this` is selected & in scope\r\n\r\n### Test Plan\r\n\r\nTell us a little a bit about how you tested your patch.\r\n\r\nExample test plan:\r\n\r\n- [x] Command-P opens the panel\r\n- [x] Clicking “+” opens the panel\r\n- [x] Clicking a source navigates to the source\r\n- [x] Clicking \"x\" closes the panel\r\n\r\nHere's the Debugger's Testing doc\r\nhttps://docs.google.com/document/d/1oBMRxV8A2ag2t22YsQOxTdEv0mXKzIg0tggJjRkU1S0/edit#.\r\nFeel free to improve it!\r\n\r\n### Screenshots/Videos (OPTIONAL)\r\n![editpreviewthis](https://cloud.githubusercontent.com/assets/5232812/23825812/f5d54510-065e-11e7-8986-bad6d7542707.gif)\r\n","created_at":"2017-03-11T18:32:25Z","updated_at":"2017-03-11T19:38:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"538f8adb3978c9e46f336a9264e6cd58f805a807","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/2340/commits","review_comments_url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/2340/comments","review_comment_url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/comments{/number}","comments_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/2340/comments","statuses_url":"https://api.github.com/repos/devtools-html/debugger.html/statuses/61a94d0ffdd80f771ec5b7b1d63b443db0299aa0","head":{"label":"jcreighton:editor-preview-this","ref":"editor-preview-this","sha":"61a94d0ffdd80f771ec5b7b1d63b443db0299aa0","user":{"login":"jcreighton","id":5232812,"avatar_url":"https://avatars1.githubusercontent.com/u/5232812?v=3","gravatar_id":"","url":"https://api.github.com/users/jcreighton","html_url":"https://github.com/jcreighton","followers_url":"https://api.github.com/users/jcreighton/followers","following_url":"https://api.github.com/users/jcreighton/following{/other_user}","gists_url":"https://api.github.com/users/jcreighton/gists{/gist_id}","starred_url":"https://api.github.com/users/jcreighton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcreighton/subscriptions","organizations_url":"https://api.github.com/users/jcreighton/orgs","repos_url":"https://api.github.com/users/jcreighton/repos","events_url":"https://api.github.com/users/jcreighton/events{/privacy}","received_events_url":"https://api.github.com/users/jcreighton/received_events","type":"User","site_admin":false},"repo":{"id":82394007,"name":"debugger.html","full_name":"jcreighton/debugger.html","owner":{"login":"jcreighton","id":5232812,"avatar_url":"https://avatars1.githubusercontent.com/u/5232812?v=3","gravatar_id":"","url":"https://api.github.com/users/jcreighton","html_url":"https://github.com/jcreighton","followers_url":"https://api.github.com/users/jcreighton/followers","following_url":"https://api.github.com/users/jcreighton/following{/other_user}","gists_url":"https://api.github.com/users/jcreighton/gists{/gist_id}","starred_url":"https://api.github.com/users/jcreighton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcreighton/subscriptions","organizations_url":"https://api.github.com/users/jcreighton/orgs","repos_url":"https://api.github.com/users/jcreighton/repos","events_url":"https://api.github.com/users/jcreighton/events{/privacy}","received_events_url":"https://api.github.com/users/jcreighton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jcreighton/debugger.html","description":"The Firefox debugger that works anywhere  :boom:","fork":true,"url":"https://api.github.com/repos/jcreighton/debugger.html","forks_url":"https://api.github.com/repos/jcreighton/debugger.html/forks","keys_url":"https://api.github.com/repos/jcreighton/debugger.html/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jcreighton/debugger.html/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jcreighton/debugger.html/teams","hooks_url":"https://api.github.com/repos/jcreighton/debugger.html/hooks","issue_events_url":"https://api.github.com/repos/jcreighton/debugger.html/issues/events{/number}","events_url":"https://api.github.com/repos/jcreighton/debugger.html/events","assignees_url":"https://api.github.com/repos/jcreighton/debugger.html/assignees{/user}","branches_url":"https://api.github.com/repos/jcreighton/debugger.html/branches{/branch}","tags_url":"https://api.github.com/repos/jcreighton/debugger.html/tags","blobs_url":"https://api.github.com/repos/jcreighton/debugger.html/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jcreighton/debugger.html/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jcreighton/debugger.html/git/refs{/sha}","trees_url":"https://api.github.com/repos/jcreighton/debugger.html/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jcreighton/debugger.html/statuses/{sha}","languages_url":"https://api.github.com/repos/jcreighton/debugger.html/languages","stargazers_url":"https://api.github.com/repos/jcreighton/debugger.html/stargazers","contributors_url":"https://api.github.com/repos/jcreighton/debugger.html/contributors","subscribers_url":"https://api.github.com/repos/jcreighton/debugger.html/subscribers","subscription_url":"https://api.github.com/repos/jcreighton/debugger.html/subscription","commits_url":"https://api.github.com/repos/jcreighton/debugger.html/commits{/sha}","git_commits_url":"https://api.github.com/repos/jcreighton/debugger.html/git/commits{/sha}","comments_url":"https://api.github.com/repos/jcreighton/debugger.html/comments{/number}","issue_comment_url":"https://api.github.com/repos/jcreighton/debugger.html/issues/comments{/number}","contents_url":"https://api.github.com/repos/jcreighton/debugger.html/contents/{+path}","compare_url":"https://api.github.com/repos/jcreighton/debugger.html/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jcreighton/debugger.html/merges","archive_url":"https://api.github.com/repos/jcreighton/debugger.html/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jcreighton/debugger.html/downloads","issues_url":"https://api.github.com/repos/jcreighton/debugger.html/issues{/number}","pulls_url":"https://api.github.com/repos/jcreighton/debugger.html/pulls{/number}","milestones_url":"https://api.github.com/repos/jcreighton/debugger.html/milestones{/number}","notifications_url":"https://api.github.com/repos/jcreighton/debugger.html/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jcreighton/debugger.html/labels{/name}","releases_url":"https://api.github.com/repos/jcreighton/debugger.html/releases{/id}","deployments_url":"https://api.github.com/repos/jcreighton/debugger.html/deployments","created_at":"2017-02-18T14:57:49Z","updated_at":"2017-02-18T14:57:51Z","pushed_at":"2017-03-11T18:35:47Z","git_url":"git://github.com/jcreighton/debugger.html.git","ssh_url":"git@github.com:jcreighton/debugger.html.git","clone_url":"https://github.com/jcreighton/debugger.html.git","svn_url":"https://github.com/jcreighton/debugger.html","homepage":"https://devtools-html.github.io/debugger.html/","size":6566,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"devtools-html:master","ref":"master","sha":"aafd83e927945d0792982f48dc9135e2a308882a","user":{"login":"devtools-html","id":19979421,"avatar_url":"https://avatars1.githubusercontent.com/u/19979421?v=3","gravatar_id":"","url":"https://api.github.com/users/devtools-html","html_url":"https://github.com/devtools-html","followers_url":"https://api.github.com/users/devtools-html/followers","following_url":"https://api.github.com/users/devtools-html/following{/other_user}","gists_url":"https://api.github.com/users/devtools-html/gists{/gist_id}","starred_url":"https://api.github.com/users/devtools-html/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devtools-html/subscriptions","organizations_url":"https://api.github.com/users/devtools-html/orgs","repos_url":"https://api.github.com/users/devtools-html/repos","events_url":"https://api.github.com/users/devtools-html/events{/privacy}","received_events_url":"https://api.github.com/users/devtools-html/received_events","type":"Organization","site_admin":false},"repo":{"id":54585418,"name":"debugger.html","full_name":"devtools-html/debugger.html","owner":{"login":"devtools-html","id":19979421,"avatar_url":"https://avatars1.githubusercontent.com/u/19979421?v=3","gravatar_id":"","url":"https://api.github.com/users/devtools-html","html_url":"https://github.com/devtools-html","followers_url":"https://api.github.com/users/devtools-html/followers","following_url":"https://api.github.com/users/devtools-html/following{/other_user}","gists_url":"https://api.github.com/users/devtools-html/gists{/gist_id}","starred_url":"https://api.github.com/users/devtools-html/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devtools-html/subscriptions","organizations_url":"https://api.github.com/users/devtools-html/orgs","repos_url":"https://api.github.com/users/devtools-html/repos","events_url":"https://api.github.com/users/devtools-html/events{/privacy}","received_events_url":"https://api.github.com/users/devtools-html/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/devtools-html/debugger.html","description":"The Firefox debugger that works anywhere  :boom:","fork":false,"url":"https://api.github.com/repos/devtools-html/debugger.html","forks_url":"https://api.github.com/repos/devtools-html/debugger.html/forks","keys_url":"https://api.github.com/repos/devtools-html/debugger.html/keys{/key_id}","collaborators_url":"https://api.github.com/repos/devtools-html/debugger.html/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/devtools-html/debugger.html/teams","hooks_url":"https://api.github.com/repos/devtools-html/debugger.html/hooks","issue_events_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/events{/number}","events_url":"https://api.github.com/repos/devtools-html/debugger.html/events","assignees_url":"https://api.github.com/repos/devtools-html/debugger.html/assignees{/user}","branches_url":"https://api.github.com/repos/devtools-html/debugger.html/branches{/branch}","tags_url":"https://api.github.com/repos/devtools-html/debugger.html/tags","blobs_url":"https://api.github.com/repos/devtools-html/debugger.html/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/devtools-html/debugger.html/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/devtools-html/debugger.html/git/refs{/sha}","trees_url":"https://api.github.com/repos/devtools-html/debugger.html/git/trees{/sha}","statuses_url":"https://api.github.com/repos/devtools-html/debugger.html/statuses/{sha}","languages_url":"https://api.github.com/repos/devtools-html/debugger.html/languages","stargazers_url":"https://api.github.com/repos/devtools-html/debugger.html/stargazers","contributors_url":"https://api.github.com/repos/devtools-html/debugger.html/contributors","subscribers_url":"https://api.github.com/repos/devtools-html/debugger.html/subscribers","subscription_url":"https://api.github.com/repos/devtools-html/debugger.html/subscription","commits_url":"https://api.github.com/repos/devtools-html/debugger.html/commits{/sha}","git_commits_url":"https://api.github.com/repos/devtools-html/debugger.html/git/commits{/sha}","comments_url":"https://api.github.com/repos/devtools-html/debugger.html/comments{/number}","issue_comment_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/comments{/number}","contents_url":"https://api.github.com/repos/devtools-html/debugger.html/contents/{+path}","compare_url":"https://api.github.com/repos/devtools-html/debugger.html/compare/{base}...{head}","merges_url":"https://api.github.com/repos/devtools-html/debugger.html/merges","archive_url":"https://api.github.com/repos/devtools-html/debugger.html/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/devtools-html/debugger.html/downloads","issues_url":"https://api.github.com/repos/devtools-html/debugger.html/issues{/number}","pulls_url":"https://api.github.com/repos/devtools-html/debugger.html/pulls{/number}","milestones_url":"https://api.github.com/repos/devtools-html/debugger.html/milestones{/number}","notifications_url":"https://api.github.com/repos/devtools-html/debugger.html/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/devtools-html/debugger.html/labels{/name}","releases_url":"https://api.github.com/repos/devtools-html/debugger.html/releases{/id}","deployments_url":"https://api.github.com/repos/devtools-html/debugger.html/deployments","created_at":"2016-03-23T18:55:36Z","updated_at":"2017-03-11T10:03:40Z","pushed_at":"2017-03-11T18:45:29Z","git_url":"git://github.com/devtools-html/debugger.html.git","ssh_url":"git@github.com:devtools-html/debugger.html.git","clone_url":"https://github.com/devtools-html/debugger.html.git","svn_url":"https://github.com/devtools-html/debugger.html","homepage":"https://devtools-html.github.io/debugger.html/","size":6568,"stargazers_count":2489,"watchers_count":2489,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":249,"mirror_url":null,"open_issues_count":106,"forks":249,"open_issues":106,"watchers":2489,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/2340"},"html":{"href":"https://github.com/devtools-html/debugger.html/pull/2340"},"issue":{"href":"https://api.github.com/repos/devtools-html/debugger.html/issues/2340"},"comments":{"href":"https://api.github.com/repos/devtools-html/debugger.html/issues/2340/comments"},"review_comments":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/2340/comments"},"review_comment":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/2340/commits"},"statuses":{"href":"https://api.github.com/repos/devtools-html/debugger.html/statuses/61a94d0ffdd80f771ec5b7b1d63b443db0299aa0"}}}}
{"actor":{"display_login":"bomsy"}}