{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/44716014","id":44716014,"diff_hunk":"@@ -88,50 +48,37 @@ proto.createdCallback = function() {\n   var $id = shadowRoot.getElementById.bind(shadowRoot);\n \n   this.els = {\n-    form:  $id('form'),\n+    inner: $id('inner'),\n     input: $id('input'),\n-    clear: $id('clear'),\n     close: $id('close')\n   };\n \n+  this.isOpen = false;\n+\n   this.els.results = document.querySelector(this.getAttribute('results'));\n \n   var onSearch = debounce(() => {\n-    this.dispatchEvent(new CustomEvent('search', {\n-      detail: this.els.input.value\n-    }));\n+    this.emit('search', this.els.input.value);\n   }, 500);\n \n-  this.els.form.addEventListener('click', (evt) => {\n-    var button = evt.target.closest('button');\n-    switch (button && button.id) {\n-      case 'clear':\n-        this.clear();\n-        onSearch();\n-        break;\n-      case 'close':\n-        this.close();\n-        break;\n-    }\n-  });\n-\n   this.els.input.addEventListener('focus', () => this.open());\n-\n+  this.els.close.addEventListener('click', () => this.close());\n   this.els.input.addEventListener('input', onSearch);\n-  this.els.input.addEventListener('keypress', onSearch);\n+  this.addEventListener('touchmove', e => e.preventDefault());\n \n-  this.onDOMRetranslated = () => {\n-    document.l10n.translateFragment(shadowRoot);\n+  this.localize = () => {\n+    document.l10n.formatValue('search')\n+      .then(result => this.els.input.placeholder = result);","path":"apps/music/elements/music-search-box.js","position":161,"original_position":161,"commit_id":"1708f68f1630a28d7faf11a05f4f3a18173fb623","original_commit_id":"1708f68f1630a28d7faf11a05f4f3a18173fb623","user":{"login":"zbraniecki","id":449986,"avatar_url":"https://avatars.githubusercontent.com/u/449986?v=3","gravatar_id":"","url":"https://api.github.com/users/zbraniecki","html_url":"https://github.com/zbraniecki","followers_url":"https://api.github.com/users/zbraniecki/followers","following_url":"https://api.github.com/users/zbraniecki/following{/other_user}","gists_url":"https://api.github.com/users/zbraniecki/gists{/gist_id}","starred_url":"https://api.github.com/users/zbraniecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zbraniecki/subscriptions","organizations_url":"https://api.github.com/users/zbraniecki/orgs","repos_url":"https://api.github.com/users/zbraniecki/repos","events_url":"https://api.github.com/users/zbraniecki/events{/privacy}","received_events_url":"https://api.github.com/users/zbraniecki/received_events","type":"User","site_admin":false},"body":"I'm ok reconsidering it. I'm a bit worried about whitelist per element since it increases the noise in MutationObserver, but except of that, sounds good.","created_at":"2015-11-12T21:18:44Z","updated_at":"2015-11-12T21:18:44Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/32975#discussion_r44716014","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32975","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/44716014"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/32975#discussion_r44716014"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32975"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32975","id":49580010,"html_url":"https://github.com/mozilla-b2g/gaia/pull/32975","diff_url":"https://github.com/mozilla-b2g/gaia/pull/32975.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/32975.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32975","number":32975,"state":"open","locked":false,"title":"Bug 1219250 - [NGA] Search field should match latest visual spec","user":{"login":"wilsonpage","id":1020551,"avatar_url":"https://avatars.githubusercontent.com/u/1020551?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonpage","html_url":"https://github.com/wilsonpage","followers_url":"https://api.github.com/users/wilsonpage/followers","following_url":"https://api.github.com/users/wilsonpage/following{/other_user}","gists_url":"https://api.github.com/users/wilsonpage/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonpage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonpage/subscriptions","organizations_url":"https://api.github.com/users/wilsonpage/orgs","repos_url":"https://api.github.com/users/wilsonpage/repos","events_url":"https://api.github.com/users/wilsonpage/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonpage/received_events","type":"User","site_admin":false},"body":null,"created_at":"2015-11-03T16:46:43Z","updated_at":"2015-11-12T21:18:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ef8631802ed307c21000509d7224473f00b89ea","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32975/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32975/comments","review_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32975/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/1708f68f1630a28d7faf11a05f4f3a18173fb623","head":{"label":"wilsonpage:1219250","ref":"1219250","sha":"1708f68f1630a28d7faf11a05f4f3a18173fb623","user":{"login":"wilsonpage","id":1020551,"avatar_url":"https://avatars.githubusercontent.com/u/1020551?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonpage","html_url":"https://github.com/wilsonpage","followers_url":"https://api.github.com/users/wilsonpage/followers","following_url":"https://api.github.com/users/wilsonpage/following{/other_user}","gists_url":"https://api.github.com/users/wilsonpage/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonpage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonpage/subscriptions","organizations_url":"https://api.github.com/users/wilsonpage/orgs","repos_url":"https://api.github.com/users/wilsonpage/repos","events_url":"https://api.github.com/users/wilsonpage/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonpage/received_events","type":"User","site_admin":false},"repo":{"id":12445689,"name":"gaia","full_name":"wilsonpage/gaia","owner":{"login":"wilsonpage","id":1020551,"avatar_url":"https://avatars.githubusercontent.com/u/1020551?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonpage","html_url":"https://github.com/wilsonpage","followers_url":"https://api.github.com/users/wilsonpage/followers","following_url":"https://api.github.com/users/wilsonpage/following{/other_user}","gists_url":"https://api.github.com/users/wilsonpage/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonpage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonpage/subscriptions","organizations_url":"https://api.github.com/users/wilsonpage/orgs","repos_url":"https://api.github.com/users/wilsonpage/repos","events_url":"https://api.github.com/users/wilsonpage/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonpage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wilsonpage/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see https://wiki.mozilla.org/Release_Management/B2G_Landing","fork":true,"url":"https://api.github.com/repos/wilsonpage/gaia","forks_url":"https://api.github.com/repos/wilsonpage/gaia/forks","keys_url":"https://api.github.com/repos/wilsonpage/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wilsonpage/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wilsonpage/gaia/teams","hooks_url":"https://api.github.com/repos/wilsonpage/gaia/hooks","issue_events_url":"https://api.github.com/repos/wilsonpage/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/wilsonpage/gaia/events","assignees_url":"https://api.github.com/repos/wilsonpage/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/wilsonpage/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/wilsonpage/gaia/tags","blobs_url":"https://api.github.com/repos/wilsonpage/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wilsonpage/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wilsonpage/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/wilsonpage/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wilsonpage/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/wilsonpage/gaia/languages","stargazers_url":"https://api.github.com/repos/wilsonpage/gaia/stargazers","contributors_url":"https://api.github.com/repos/wilsonpage/gaia/contributors","subscribers_url":"https://api.github.com/repos/wilsonpage/gaia/subscribers","subscription_url":"https://api.github.com/repos/wilsonpage/gaia/subscription","commits_url":"https://api.github.com/repos/wilsonpage/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/wilsonpage/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/wilsonpage/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/wilsonpage/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/wilsonpage/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/wilsonpage/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wilsonpage/gaia/merges","archive_url":"https://api.github.com/repos/wilsonpage/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wilsonpage/gaia/downloads","issues_url":"https://api.github.com/repos/wilsonpage/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/wilsonpage/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/wilsonpage/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/wilsonpage/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wilsonpage/gaia/labels{/name}","releases_url":"https://api.github.com/repos/wilsonpage/gaia/releases{/id}","created_at":"2013-08-28T22:05:50Z","updated_at":"2014-07-04T13:11:38Z","pushed_at":"2015-11-06T20:25:56Z","git_url":"git://github.com/wilsonpage/gaia.git","ssh_url":"git@github.com:wilsonpage/gaia.git","clone_url":"https://github.com/wilsonpage/gaia.git","svn_url":"https://github.com/wilsonpage/gaia","homepage":"https://wiki.mozilla.org/B2G","size":972467,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-b2g:master","ref":"master","sha":"4d402f2380b6cfd9e85aaab26b832db54be0dd10","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"repo":{"id":2317369,"name":"gaia","full_name":"mozilla-b2g/gaia","owner":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-b2g/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":false,"url":"https://api.github.com/repos/mozilla-b2g/gaia","forks_url":"https://api.github.com/repos/mozilla-b2g/gaia/forks","keys_url":"https://api.github.com/repos/mozilla-b2g/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-b2g/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-b2g/gaia/teams","hooks_url":"https://api.github.com/repos/mozilla-b2g/gaia/hooks","issue_events_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-b2g/gaia/events","assignees_url":"https://api.github.com/repos/mozilla-b2g/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-b2g/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/tags","blobs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-b2g/gaia/languages","stargazers_url":"https://api.github.com/repos/mozilla-b2g/gaia/stargazers","contributors_url":"https://api.github.com/repos/mozilla-b2g/gaia/contributors","subscribers_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscribers","subscription_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscription","commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-b2g/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-b2g/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-b2g/gaia/merges","archive_url":"https://api.github.com/repos/mozilla-b2g/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-b2g/gaia/downloads","issues_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-b2g/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-b2g/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-b2g/gaia/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-b2g/gaia/releases{/id}","created_at":"2011-09-03T01:38:46Z","updated_at":"2015-11-11T06:54:22Z","pushed_at":"2015-11-12T20:56:43Z","git_url":"git://github.com/mozilla-b2g/gaia.git","ssh_url":"git@github.com:mozilla-b2g/gaia.git","clone_url":"https://github.com/mozilla-b2g/gaia.git","svn_url":"https://github.com/mozilla-b2g/gaia","homepage":"https://wiki.mozilla.org/B2G","size":1702629,"stargazers_count":2003,"watchers_count":2003,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2524,"mirror_url":null,"open_issues_count":1274,"forks":2524,"open_issues":1274,"watchers":2003,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32975"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/32975"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32975"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32975/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32975/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32975/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/1708f68f1630a28d7faf11a05f4f3a18173fb623"}}}}