{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/frontend/pulls/comments/33678289","id":33678289,"diff_hunk":"@@ -48,9 +56,10 @@ define([\n         }\n \n         this.focusSearchField = function () {\n-            var $input = $('input.gsc-input');\n+            var $input = $('input.gsc-input'),\n+                inputLenght = $input.length;","path":"static/src/javascripts/projects/common/modules/navigation/search.js","position":37,"original_position":37,"commit_id":"c11a3b2030533c9cde3707c6571158f93585e3a5","original_commit_id":"c11a3b2030533c9cde3707c6571158f93585e3a5","user":{"login":"robertberry","id":1001642,"avatar_url":"https://avatars.githubusercontent.com/u/1001642?v=3","gravatar_id":"","url":"https://api.github.com/users/robertberry","html_url":"https://github.com/robertberry","followers_url":"https://api.github.com/users/robertberry/followers","following_url":"https://api.github.com/users/robertberry/following{/other_user}","gists_url":"https://api.github.com/users/robertberry/gists{/gist_id}","starred_url":"https://api.github.com/users/robertberry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertberry/subscriptions","organizations_url":"https://api.github.com/users/robertberry/orgs","repos_url":"https://api.github.com/users/robertberry/repos","events_url":"https://api.github.com/users/robertberry/events{/privacy}","received_events_url":"https://api.github.com/users/robertberry/received_events","type":"User","site_admin":false},"body":"Also why are you putting this into a `var`? You only seem to use it in one place.","created_at":"2015-07-01T13:36:41Z","updated_at":"2015-07-01T13:36:41Z","html_url":"https://github.com/guardian/frontend/pull/9657#discussion_r33678289","pull_request_url":"https://api.github.com/repos/guardian/frontend/pulls/9657","_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments/33678289"},"html":{"href":"https://github.com/guardian/frontend/pull/9657#discussion_r33678289"},"pull_request":{"href":"https://api.github.com/repos/guardian/frontend/pulls/9657"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/frontend/pulls/9657","id":38966372,"html_url":"https://github.com/guardian/frontend/pull/9657","diff_url":"https://github.com/guardian/frontend/pull/9657.diff","patch_url":"https://github.com/guardian/frontend/pull/9657.patch","issue_url":"https://api.github.com/repos/guardian/frontend/issues/9657","number":9657,"state":"open","locked":false,"title":"Viewability search form","user":{"login":"uplne","id":2579465,"avatar_url":"https://avatars.githubusercontent.com/u/2579465?v=3","gravatar_id":"","url":"https://api.github.com/users/uplne","html_url":"https://github.com/uplne","followers_url":"https://api.github.com/users/uplne/followers","following_url":"https://api.github.com/users/uplne/following{/other_user}","gists_url":"https://api.github.com/users/uplne/gists{/gist_id}","starred_url":"https://api.github.com/users/uplne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uplne/subscriptions","organizations_url":"https://api.github.com/users/uplne/orgs","repos_url":"https://api.github.com/users/uplne/repos","events_url":"https://api.github.com/users/uplne/events{/privacy}","received_events_url":"https://api.github.com/users/uplne/received_events","type":"User","site_admin":false},"body":"1. Removing close on scroll\r\n2. Detecting mobile\r\n3. Disabling autoComplete\r\n4. Updated behaviour\r\n\r\nDekstop in normal mode:\r\n![searchdesktop1](https://cloud.githubusercontent.com/assets/2579465/8452224/e1ebcc06-1fe0-11e5-8ebc-8a5af48ef4c4.gif)\r\n\r\nDesktop in slim mode:\r\n![searchdesktop2](https://cloud.githubusercontent.com/assets/2579465/8452229/ea49ee5a-1fe0-11e5-8667-775fa7548838.gif)\r\n\r\nMobile:\r\n![searchmobile](https://cloud.githubusercontent.com/assets/2579465/8452233/f78ad5c0-1fe0-11e5-9183-020d81fb7512.gif)\r\n","created_at":"2015-07-01T10:04:44Z","updated_at":"2015-07-01T13:36:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67f604aa21083bd590ba838d03d76c97ca7278fd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guardian/frontend/pulls/9657/commits","review_comments_url":"https://api.github.com/repos/guardian/frontend/pulls/9657/comments","review_comment_url":"https://api.github.com/repos/guardian/frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/frontend/issues/9657/comments","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/c11a3b2030533c9cde3707c6571158f93585e3a5","head":{"label":"guardian:viewability-search-form","ref":"viewability-search-form","sha":"c11a3b2030533c9cde3707c6571158f93585e3a5","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for theguardian.com","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","created_at":"2012-05-18T15:39:15Z","updated_at":"2015-06-30T19:58:19Z","pushed_at":"2015-07-01T12:49:53Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"http://www.theguardian.com","size":530283,"stargazers_count":2824,"watchers_count":2824,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":264,"mirror_url":null,"open_issues_count":161,"forks":264,"open_issues":161,"watchers":2824,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"ed2732077622d0f2528a08c0aabc64ffc2964465","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for theguardian.com","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","created_at":"2012-05-18T15:39:15Z","updated_at":"2015-06-30T19:58:19Z","pushed_at":"2015-07-01T12:49:53Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"http://www.theguardian.com","size":530283,"stargazers_count":2824,"watchers_count":2824,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":264,"mirror_url":null,"open_issues_count":161,"forks":264,"open_issues":161,"watchers":2824,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/9657"},"html":{"href":"https://github.com/guardian/frontend/pull/9657"},"issue":{"href":"https://api.github.com/repos/guardian/frontend/issues/9657"},"comments":{"href":"https://api.github.com/repos/guardian/frontend/issues/9657/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/frontend/pulls/9657/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/frontend/pulls/9657/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/frontend/statuses/c11a3b2030533c9cde3707c6571158f93585e3a5"}}}}