GitHub PullRequestReviewCommentEvent at 2014-05-13 23:27:11
Repository: gaia
Actor: daleharvey
Payload: {"comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/12614587","id":12614587,"diff_hunk":"@@ -145,24 +131,92 @@\n     this.elements.list.appendChild(this.elements.cancel);\n   };\n \n-  BrowserContextMenu.prototype._listItems = function bcm__listItems(choices) {\n+  BrowserContextMenu.prototype._listItems = function(detail) {\n+\n+    var self = this;\n     var items = [];\n \n-    choices.forEach(function(choice, index) {\n-      items.push({\n-        label: choice.label,\n-        icon: choice.icon,\n-        value: index\n+    if (detail.contextmenu && detail.contextmenu.items.length) {\n+      detail.contextmenu.items.forEach(function(choice, index) {\n+        items.push({\n+          label: choice.label,\n+          icon: choice.icon,\n+          callback: function() {\n+            self.hide();\n+            detail.contextMenuItemSelected(choice.id);\n+          }\n+        });\n       });\n-    });\n+    }\n+\n+    //if (this.app.isBrowser()) {","path":"apps/system/js/browser_context_menu.js","position":168,"original_position":168,"commit_id":"0c675ede42036d431060ff54ff8b80b590a8889c","original_commit_id":"0c675ede42036d431060ff54ff8b80b590a8889c","user":{"login":"daleharvey","id":37787,"avatar_url":"https://avatars.githubusercontent.com/u/37787?","gravatar_id":"030451d8cfc268d666bae9a7fe8d10ec","url":"https://api.github.com/users/daleharvey","html_url":"https://github.com/daleharvey","followers_url":"https://api.github.com/users/daleharvey/followers","following_url":"https://api.github.com/users/daleharvey/following{/other_user}","gists_url":"https://api.github.com/users/daleharvey/gists{/gist_id}","starred_url":"https://api.github.com/users/daleharvey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daleharvey/subscriptions","organizations_url":"https://api.github.com/users/daleharvey/orgs","repos_url":"https://api.github.com/users/daleharvey/repos","events_url":"https://api.github.com/users/daleharvey/events{/privacy}","received_events_url":"https://api.github.com/users/daleharvey/received_events","type":"User","site_admin":false},"body":"I dont think so, this is currently heavily used in gaia apps and is going to cause bugs, like if I long press on the \"compose message\" button in the messages app the context menu will show, I feel like there is gonna be too many of these to file bugs for and fix","created_at":"2014-05-13T23:27:11Z","updated_at":"2014-05-13T23:27:11Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/19181#discussion_r12614587","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/19181","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/12614587"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/19181#discussion_r12614587"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/19181"}}}}