{"action":"created","comment":{"url":"https://api.github.com/repos/NewSpring/Holtzmann/pulls/comments/79615467","id":79615467,"diff_hunk":"@@ -50,19 +55,48 @@ export default class AudioScrubber extends Component {\n \n     if(typeof percent === \"number\") {\n       this.seek(percent);\n-    }\n+    };\n \n     setTimeout(() => {\n+      // Set states back to intial values so that time updates,\n+      // and click events will happen appropriatly.\n+      // Timeout is a full second as a shorter timeout did not\n+      // set this states properly.\n       this.setState({\n-        lastPercent: null,\n+        scrubbing: false,\n         override: false\n       });\n-    }, 250);\n+    }, 1000);\n   }\n \n   click = (e) => {\n-    const percentClicked = this.calculatePercent(e.target, e.clientX);\n-    this.seek(percentClicked);\n+    // We are checking if a scrub is currently taking place,\n+    // as a onTouchEnd and Click event were both happening on scrub.\n+    const { scrubbing } = this.state;\n+\n+    // If a user is scrubbing, don't execute the onClick event\n+    if(!scrubbing) {\n+\n+      const percentClicked = this.calculatePercent(e.target, e.clientX);\n+\n+      // Setting the state allows our time, and position to consistantly update.\n+      this.setState({\n+        lastPercent: percentClicked,\n+        override: true\n+      });\n+\n+      this.seek(percentClicked);\n+\n+      // We need to set the state back to it's initial value to allow incrementing\n+      // of the current time.\n+      // Timeout is a full second as a shorter timeout did not set the state appropriatly.\n+      setTimeout(() => {","path":"imports/components/players/audio/audio.Scrubber.js","position":63,"original_position":63,"commit_id":"9ac57c6ea089fb53401e8c556ed06114374479a0","original_commit_id":"9ac57c6ea089fb53401e8c556ed06114374479a0","user":{"login":"jbaxleyiii","id":4967600,"avatar_url":"https://avatars.githubusercontent.com/u/4967600?v=3","gravatar_id":"","url":"https://api.github.com/users/jbaxleyiii","html_url":"https://github.com/jbaxleyiii","followers_url":"https://api.github.com/users/jbaxleyiii/followers","following_url":"https://api.github.com/users/jbaxleyiii/following{/other_user}","gists_url":"https://api.github.com/users/jbaxleyiii/gists{/gist_id}","starred_url":"https://api.github.com/users/jbaxleyiii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbaxleyiii/subscriptions","organizations_url":"https://api.github.com/users/jbaxleyiii/orgs","repos_url":"https://api.github.com/users/jbaxleyiii/repos","events_url":"https://api.github.com/users/jbaxleyiii/events{/privacy}","received_events_url":"https://api.github.com/users/jbaxleyiii/received_events","type":"User","site_admin":false},"body":"Same thing as above here. setting state when unmounted will throw","created_at":"2016-09-20T13:55:06Z","updated_at":"2016-09-20T13:55:24Z","html_url":"https://github.com/NewSpring/Holtzmann/pull/1144#discussion_r79615467","pull_request_url":"https://api.github.com/repos/NewSpring/Holtzmann/pulls/1144","_links":{"self":{"href":"https://api.github.com/repos/NewSpring/Holtzmann/pulls/comments/79615467"},"html":{"href":"https://github.com/NewSpring/Holtzmann/pull/1144#discussion_r79615467"},"pull_request":{"href":"https://api.github.com/repos/NewSpring/Holtzmann/pulls/1144"}}},"pull_request":{"url":"https://api.github.com/repos/NewSpring/Holtzmann/pulls/1144","id":85869758,"html_url":"https://github.com/NewSpring/Holtzmann/pull/1144","diff_url":"https://github.com/NewSpring/Holtzmann/pull/1144.diff","patch_url":"https://github.com/NewSpring/Holtzmann/pull/1144.patch","issue_url":"https://api.github.com/repos/NewSpring/Holtzmann/issues/1144","number":1144,"state":"open","locked":false,"title":"Fix scrub position","user":{"login":"edolyne","id":3417857,"avatar_url":"https://avatars.githubusercontent.com/u/3417857?v=3","gravatar_id":"","url":"https://api.github.com/users/edolyne","html_url":"https://github.com/edolyne","followers_url":"https://api.github.com/users/edolyne/followers","following_url":"https://api.github.com/users/edolyne/following{/other_user}","gists_url":"https://api.github.com/users/edolyne/gists{/gist_id}","starred_url":"https://api.github.com/users/edolyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edolyne/subscriptions","organizations_url":"https://api.github.com/users/edolyne/orgs","repos_url":"https://api.github.com/users/edolyne/repos","events_url":"https://api.github.com/users/edolyne/events{/privacy}","received_events_url":"https://api.github.com/users/edolyne/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-19T21:07:20Z","updated_at":"2016-09-20T13:55:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c74e47701a66580c5be5ec68b5b256f85bc98966","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/NewSpring/Holtzmann/pulls/1144/commits","review_comments_url":"https://api.github.com/repos/NewSpring/Holtzmann/pulls/1144/comments","review_comment_url":"https://api.github.com/repos/NewSpring/Holtzmann/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NewSpring/Holtzmann/issues/1144/comments","statuses_url":"https://api.github.com/repos/NewSpring/Holtzmann/statuses/9ac57c6ea089fb53401e8c556ed06114374479a0","head":{"label":"NewSpring:fix-scrubPosition","ref":"fix-scrubPosition","sha":"9ac57c6ea089fb53401e8c556ed06114374479a0","user":{"login":"NewSpring","id":1241964,"avatar_url":"https://avatars.githubusercontent.com/u/1241964?v=3","gravatar_id":"","url":"https://api.github.com/users/NewSpring","html_url":"https://github.com/NewSpring","followers_url":"https://api.github.com/users/NewSpring/followers","following_url":"https://api.github.com/users/NewSpring/following{/other_user}","gists_url":"https://api.github.com/users/NewSpring/gists{/gist_id}","starred_url":"https://api.github.com/users/NewSpring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NewSpring/subscriptions","organizations_url":"https://api.github.com/users/NewSpring/orgs","repos_url":"https://api.github.com/users/NewSpring/repos","events_url":"https://api.github.com/users/NewSpring/events{/privacy}","received_events_url":"https://api.github.com/users/NewSpring/received_events","type":"Organization","site_admin":false},"repo":{"id":31171598,"name":"Holtzmann","full_name":"NewSpring/Holtzmann","owner":{"login":"NewSpring","id":1241964,"avatar_url":"https://avatars.githubusercontent.com/u/1241964?v=3","gravatar_id":"","url":"https://api.github.com/users/NewSpring","html_url":"https://github.com/NewSpring","followers_url":"https://api.github.com/users/NewSpring/followers","following_url":"https://api.github.com/users/NewSpring/following{/other_user}","gists_url":"https://api.github.com/users/NewSpring/gists{/gist_id}","starred_url":"https://api.github.com/users/NewSpring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NewSpring/subscriptions","organizations_url":"https://api.github.com/users/NewSpring/orgs","repos_url":"https://api.github.com/users/NewSpring/repos","events_url":"https://api.github.com/users/NewSpring/events{/privacy}","received_events_url":"https://api.github.com/users/NewSpring/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NewSpring/Holtzmann","description":"The main NewSpring namespace and utilities for all newspring packages. ","fork":false,"url":"https://api.github.com/repos/NewSpring/Holtzmann","forks_url":"https://api.github.com/repos/NewSpring/Holtzmann/forks","keys_url":"https://api.github.com/repos/NewSpring/Holtzmann/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NewSpring/Holtzmann/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NewSpring/Holtzmann/teams","hooks_url":"https://api.github.com/repos/NewSpring/Holtzmann/hooks","issue_events_url":"https://api.github.com/repos/NewSpring/Holtzmann/issues/events{/number}","events_url":"https://api.github.com/repos/NewSpring/Holtzmann/events","assignees_url":"https://api.github.com/repos/NewSpring/Holtzmann/assignees{/user}","branches_url":"https://api.github.com/repos/NewSpring/Holtzmann/branches{/branch}","tags_url":"https://api.github.com/repos/NewSpring/Holtzmann/tags","blobs_url":"https://api.github.com/repos/NewSpring/Holtzmann/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NewSpring/Holtzmann/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NewSpring/Holtzmann/git/refs{/sha}","trees_url":"https://api.github.com/repos/NewSpring/Holtzmann/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NewSpring/Holtzmann/statuses/{sha}","languages_url":"https://api.github.com/repos/NewSpring/Holtzmann/languages","stargazers_url":"https://api.github.com/repos/NewSpring/Holtzmann/stargazers","contributors_url":"https://api.github.com/repos/NewSpring/Holtzmann/contributors","subscribers_url":"https://api.github.com/repos/NewSpring/Holtzmann/subscribers","subscription_url":"https://api.github.com/repos/NewSpring/Holtzmann/subscription","commits_url":"https://api.github.com/repos/NewSpring/Holtzmann/commits{/sha}","git_commits_url":"https://api.github.com/repos/NewSpring/Holtzmann/git/commits{/sha}","comments_url":"https://api.github.com/repos/NewSpring/Holtzmann/comments{/number}","issue_comment_url":"https://api.github.com/repos/NewSpring/Holtzmann/issues/comments{/number}","contents_url":"https://api.github.com/repos/NewSpring/Holtzmann/contents/{+path}","compare_url":"https://api.github.com/repos/NewSpring/Holtzmann/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NewSpring/Holtzmann/merges","archive_url":"https://api.github.com/repos/NewSpring/Holtzmann/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NewSpring/Holtzmann/downloads","issues_url":"https://api.github.com/repos/NewSpring/Holtzmann/issues{/number}","pulls_url":"https://api.github.com/repos/NewSpring/Holtzmann/pulls{/number}","milestones_url":"https://api.github.com/repos/NewSpring/Holtzmann/milestones{/number}","notifications_url":"https://api.github.com/repos/NewSpring/Holtzmann/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NewSpring/Holtzmann/labels{/name}","releases_url":"https://api.github.com/repos/NewSpring/Holtzmann/releases{/id}","deployments_url":"https://api.github.com/repos/NewSpring/Holtzmann/deployments","created_at":"2015-02-22T17:27:05Z","updated_at":"2016-09-14T14:42:21Z","pushed_at":"2016-09-20T13:52:26Z","git_url":"git://github.com/NewSpring/Holtzmann.git","ssh_url":"git@github.com:NewSpring/Holtzmann.git","clone_url":"https://github.com/NewSpring/Holtzmann.git","svn_url":"https://github.com/NewSpring/Holtzmann","homepage":"","size":23373,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":95,"forks":4,"open_issues":95,"watchers":10,"default_branch":"master"}},"base":{"label":"NewSpring:master","ref":"master","sha":"ba052fec89b3bffad9a96db934a4f0f44c546759","user":{"login":"NewSpring","id":1241964,"avatar_url":"https://avatars.githubusercontent.com/u/1241964?v=3","gravatar_id":"","url":"https://api.github.com/users/NewSpring","html_url":"https://github.com/NewSpring","followers_url":"https://api.github.com/users/NewSpring/followers","following_url":"https://api.github.com/users/NewSpring/following{/other_user}","gists_url":"https://api.github.com/users/NewSpring/gists{/gist_id}","starred_url":"https://api.github.com/users/NewSpring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NewSpring/subscriptions","organizations_url":"https://api.github.com/users/NewSpring/orgs","repos_url":"https://api.github.com/users/NewSpring/repos","events_url":"https://api.github.com/users/NewSpring/events{/privacy}","received_events_url":"https://api.github.com/users/NewSpring/received_events","type":"Organization","site_admin":false},"repo":{"id":31171598,"name":"Holtzmann","full_name":"NewSpring/Holtzmann","owner":{"login":"NewSpring","id":1241964,"avatar_url":"https://avatars.githubusercontent.com/u/1241964?v=3","gravatar_id":"","url":"https://api.github.com/users/NewSpring","html_url":"https://github.com/NewSpring","followers_url":"https://api.github.com/users/NewSpring/followers","following_url":"https://api.github.com/users/NewSpring/following{/other_user}","gists_url":"https://api.github.com/users/NewSpring/gists{/gist_id}","starred_url":"https://api.github.com/users/NewSpring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NewSpring/subscriptions","organizations_url":"https://api.github.com/users/NewSpring/orgs","repos_url":"https://api.github.com/users/NewSpring/repos","events_url":"https://api.github.com/users/NewSpring/events{/privacy}","received_events_url":"https://api.github.com/users/NewSpring/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NewSpring/Holtzmann","description":"The main NewSpring namespace and utilities for all newspring packages. ","fork":false,"url":"https://api.github.com/repos/NewSpring/Holtzmann","forks_url":"https://api.github.com/repos/NewSpring/Holtzmann/forks","keys_url":"https://api.github.com/repos/NewSpring/Holtzmann/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NewSpring/Holtzmann/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NewSpring/Holtzmann/teams","hooks_url":"https://api.github.com/repos/NewSpring/Holtzmann/hooks","issue_events_url":"https://api.github.com/repos/NewSpring/Holtzmann/issues/events{/number}","events_url":"https://api.github.com/repos/NewSpring/Holtzmann/events","assignees_url":"https://api.github.com/repos/NewSpring/Holtzmann/assignees{/user}","branches_url":"https://api.github.com/repos/NewSpring/Holtzmann/branches{/branch}","tags_url":"https://api.github.com/repos/NewSpring/Holtzmann/tags","blobs_url":"https://api.github.com/repos/NewSpring/Holtzmann/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NewSpring/Holtzmann/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NewSpring/Holtzmann/git/refs{/sha}","trees_url":"https://api.github.com/repos/NewSpring/Holtzmann/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NewSpring/Holtzmann/statuses/{sha}","languages_url":"https://api.github.com/repos/NewSpring/Holtzmann/languages","stargazers_url":"https://api.github.com/repos/NewSpring/Holtzmann/stargazers","contributors_url":"https://api.github.com/repos/NewSpring/Holtzmann/contributors","subscribers_url":"https://api.github.com/repos/NewSpring/Holtzmann/subscribers","subscription_url":"https://api.github.com/repos/NewSpring/Holtzmann/subscription","commits_url":"https://api.github.com/repos/NewSpring/Holtzmann/commits{/sha}","git_commits_url":"https://api.github.com/repos/NewSpring/Holtzmann/git/commits{/sha}","comments_url":"https://api.github.com/repos/NewSpring/Holtzmann/comments{/number}","issue_comment_url":"https://api.github.com/repos/NewSpring/Holtzmann/issues/comments{/number}","contents_url":"https://api.github.com/repos/NewSpring/Holtzmann/contents/{+path}","compare_url":"https://api.github.com/repos/NewSpring/Holtzmann/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NewSpring/Holtzmann/merges","archive_url":"https://api.github.com/repos/NewSpring/Holtzmann/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NewSpring/Holtzmann/downloads","issues_url":"https://api.github.com/repos/NewSpring/Holtzmann/issues{/number}","pulls_url":"https://api.github.com/repos/NewSpring/Holtzmann/pulls{/number}","milestones_url":"https://api.github.com/repos/NewSpring/Holtzmann/milestones{/number}","notifications_url":"https://api.github.com/repos/NewSpring/Holtzmann/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NewSpring/Holtzmann/labels{/name}","releases_url":"https://api.github.com/repos/NewSpring/Holtzmann/releases{/id}","deployments_url":"https://api.github.com/repos/NewSpring/Holtzmann/deployments","created_at":"2015-02-22T17:27:05Z","updated_at":"2016-09-14T14:42:21Z","pushed_at":"2016-09-20T13:52:26Z","git_url":"git://github.com/NewSpring/Holtzmann.git","ssh_url":"git@github.com:NewSpring/Holtzmann.git","clone_url":"https://github.com/NewSpring/Holtzmann.git","svn_url":"https://github.com/NewSpring/Holtzmann","homepage":"","size":23373,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":95,"forks":4,"open_issues":95,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NewSpring/Holtzmann/pulls/1144"},"html":{"href":"https://github.com/NewSpring/Holtzmann/pull/1144"},"issue":{"href":"https://api.github.com/repos/NewSpring/Holtzmann/issues/1144"},"comments":{"href":"https://api.github.com/repos/NewSpring/Holtzmann/issues/1144/comments"},"review_comments":{"href":"https://api.github.com/repos/NewSpring/Holtzmann/pulls/1144/comments"},"review_comment":{"href":"https://api.github.com/repos/NewSpring/Holtzmann/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NewSpring/Holtzmann/pulls/1144/commits"},"statuses":{"href":"https://api.github.com/repos/NewSpring/Holtzmann/statuses/9ac57c6ea089fb53401e8c556ed06114374479a0"}}}}
{"actor":{"display_login":"jbaxleyiii"}}