{"action":"created","comment":{"url":"https://api.github.com/repos/cocos2d/cocos2d-html5/pulls/comments/30246940","id":30246940,"diff_hunk":"@@ -656,12 +665,27 @@ ccui.Widget = ccui.ProtectedNode.extend(/** @lends ccui.Widget# */{\n      * @param {Boolean} enable  true if the widget is touch enabled, false if the widget is touch disabled.\n      */\n     setTouchEnabled: function (enable) {\n-        if (this._touchEnabled === enable)\n-            return;\n+        if (enable == false) {","path":"extensions/ccui/base-classes/UIWidget.js","position":42,"original_position":42,"commit_id":"5b2d8a474ee90db8a1fcd8128e90b914daa8336f","original_commit_id":"5b2d8a474ee90db8a1fcd8128e90b914daa8336f","user":{"login":"pandamicro","id":632460,"avatar_url":"https://avatars.githubusercontent.com/u/632460?v=3","gravatar_id":"","url":"https://api.github.com/users/pandamicro","html_url":"https://github.com/pandamicro","followers_url":"https://api.github.com/users/pandamicro/followers","following_url":"https://api.github.com/users/pandamicro/following{/other_user}","gists_url":"https://api.github.com/users/pandamicro/gists{/gist_id}","starred_url":"https://api.github.com/users/pandamicro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pandamicro/subscriptions","organizations_url":"https://api.github.com/users/pandamicro/orgs","repos_url":"https://api.github.com/users/pandamicro/repos","events_url":"https://api.github.com/users/pandamicro/events{/privacy}","received_events_url":"https://api.github.com/users/pandamicro/received_events","type":"User","site_admin":false},"body":"Please use strict check with === or !==","created_at":"2015-05-13T16:06:32Z","updated_at":"2015-05-13T16:06:32Z","html_url":"https://github.com/cocos2d/cocos2d-html5/pull/2886#discussion_r30246940","pull_request_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/pulls/2886","_links":{"self":{"href":"https://api.github.com/repos/cocos2d/cocos2d-html5/pulls/comments/30246940"},"html":{"href":"https://github.com/cocos2d/cocos2d-html5/pull/2886#discussion_r30246940"},"pull_request":{"href":"https://api.github.com/repos/cocos2d/cocos2d-html5/pulls/2886"}}},"pull_request":{"url":"https://api.github.com/repos/cocos2d/cocos2d-html5/pulls/2886","id":35140254,"html_url":"https://github.com/cocos2d/cocos2d-html5/pull/2886","diff_url":"https://github.com/cocos2d/cocos2d-html5/pull/2886.diff","patch_url":"https://github.com/cocos2d/cocos2d-html5/pull/2886.patch","issue_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/issues/2886","number":2886,"state":"open","locked":false,"title":"Only add touch listener if widget is in the running scene","user":{"login":"lassade","id":9643105,"avatar_url":"https://avatars.githubusercontent.com/u/9643105?v=3","gravatar_id":"","url":"https://api.github.com/users/lassade","html_url":"https://github.com/lassade","followers_url":"https://api.github.com/users/lassade/followers","following_url":"https://api.github.com/users/lassade/following{/other_user}","gists_url":"https://api.github.com/users/lassade/gists{/gist_id}","starred_url":"https://api.github.com/users/lassade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lassade/subscriptions","organizations_url":"https://api.github.com/users/lassade/orgs","repos_url":"https://api.github.com/users/lassade/repos","events_url":"https://api.github.com/users/lassade/events{/privacy}","received_events_url":"https://api.github.com/users/lassade/received_events","type":"User","site_admin":false},"body":"Right now if i cache a scene with one button widget your listener will be added in the eventMananger and will swallow touch events even if the scene is not running.\r\n\r\nIn the cocos2d-x (cpp version) the listeners are removed and added in the onExit and onEnter envets, so i added an method called _manageListener to add or remove the listener to be called in these functions, setTouchEnabled now only call _manageListener  if the _onRunningScene is seted, but it will always remove the listener.","created_at":"2015-05-11T15:45:58Z","updated_at":"2015-05-13T16:06:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"363abdd3e99587bfeebd98409b09764812f16c85","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/pulls/2886/commits","review_comments_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/pulls/2886/comments","review_comment_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/issues/2886/comments","statuses_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/statuses/5b2d8a474ee90db8a1fcd8128e90b914daa8336f","head":{"label":"lassade:patch-2","ref":"patch-2","sha":"5b2d8a474ee90db8a1fcd8128e90b914daa8336f","user":{"login":"lassade","id":9643105,"avatar_url":"https://avatars.githubusercontent.com/u/9643105?v=3","gravatar_id":"","url":"https://api.github.com/users/lassade","html_url":"https://github.com/lassade","followers_url":"https://api.github.com/users/lassade/followers","following_url":"https://api.github.com/users/lassade/following{/other_user}","gists_url":"https://api.github.com/users/lassade/gists{/gist_id}","starred_url":"https://api.github.com/users/lassade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lassade/subscriptions","organizations_url":"https://api.github.com/users/lassade/orgs","repos_url":"https://api.github.com/users/lassade/repos","events_url":"https://api.github.com/users/lassade/events{/privacy}","received_events_url":"https://api.github.com/users/lassade/received_events","type":"User","site_admin":false},"repo":{"id":29408174,"name":"cocos2d-html5","full_name":"lassade/cocos2d-html5","owner":{"login":"lassade","id":9643105,"avatar_url":"https://avatars.githubusercontent.com/u/9643105?v=3","gravatar_id":"","url":"https://api.github.com/users/lassade","html_url":"https://github.com/lassade","followers_url":"https://api.github.com/users/lassade/followers","following_url":"https://api.github.com/users/lassade/following{/other_user}","gists_url":"https://api.github.com/users/lassade/gists{/gist_id}","starred_url":"https://api.github.com/users/lassade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lassade/subscriptions","organizations_url":"https://api.github.com/users/lassade/orgs","repos_url":"https://api.github.com/users/lassade/repos","events_url":"https://api.github.com/users/lassade/events{/privacy}","received_events_url":"https://api.github.com/users/lassade/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lassade/cocos2d-html5","description":"cocos2d for Web Browsers. Built using JavaScript","fork":true,"url":"https://api.github.com/repos/lassade/cocos2d-html5","forks_url":"https://api.github.com/repos/lassade/cocos2d-html5/forks","keys_url":"https://api.github.com/repos/lassade/cocos2d-html5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lassade/cocos2d-html5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lassade/cocos2d-html5/teams","hooks_url":"https://api.github.com/repos/lassade/cocos2d-html5/hooks","issue_events_url":"https://api.github.com/repos/lassade/cocos2d-html5/issues/events{/number}","events_url":"https://api.github.com/repos/lassade/cocos2d-html5/events","assignees_url":"https://api.github.com/repos/lassade/cocos2d-html5/assignees{/user}","branches_url":"https://api.github.com/repos/lassade/cocos2d-html5/branches{/branch}","tags_url":"https://api.github.com/repos/lassade/cocos2d-html5/tags","blobs_url":"https://api.github.com/repos/lassade/cocos2d-html5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lassade/cocos2d-html5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lassade/cocos2d-html5/git/refs{/sha}","trees_url":"https://api.github.com/repos/lassade/cocos2d-html5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lassade/cocos2d-html5/statuses/{sha}","languages_url":"https://api.github.com/repos/lassade/cocos2d-html5/languages","stargazers_url":"https://api.github.com/repos/lassade/cocos2d-html5/stargazers","contributors_url":"https://api.github.com/repos/lassade/cocos2d-html5/contributors","subscribers_url":"https://api.github.com/repos/lassade/cocos2d-html5/subscribers","subscription_url":"https://api.github.com/repos/lassade/cocos2d-html5/subscription","commits_url":"https://api.github.com/repos/lassade/cocos2d-html5/commits{/sha}","git_commits_url":"https://api.github.com/repos/lassade/cocos2d-html5/git/commits{/sha}","comments_url":"https://api.github.com/repos/lassade/cocos2d-html5/comments{/number}","issue_comment_url":"https://api.github.com/repos/lassade/cocos2d-html5/issues/comments{/number}","contents_url":"https://api.github.com/repos/lassade/cocos2d-html5/contents/{+path}","compare_url":"https://api.github.com/repos/lassade/cocos2d-html5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lassade/cocos2d-html5/merges","archive_url":"https://api.github.com/repos/lassade/cocos2d-html5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lassade/cocos2d-html5/downloads","issues_url":"https://api.github.com/repos/lassade/cocos2d-html5/issues{/number}","pulls_url":"https://api.github.com/repos/lassade/cocos2d-html5/pulls{/number}","milestones_url":"https://api.github.com/repos/lassade/cocos2d-html5/milestones{/number}","notifications_url":"https://api.github.com/repos/lassade/cocos2d-html5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lassade/cocos2d-html5/labels{/name}","releases_url":"https://api.github.com/repos/lassade/cocos2d-html5/releases{/id}","created_at":"2015-01-17T22:38:47Z","updated_at":"2015-01-17T22:38:50Z","pushed_at":"2015-05-11T15:45:09Z","git_url":"git://github.com/lassade/cocos2d-html5.git","ssh_url":"git@github.com:lassade/cocos2d-html5.git","clone_url":"https://github.com/lassade/cocos2d-html5.git","svn_url":"https://github.com/lassade/cocos2d-html5","homepage":"http://www.cocos2d-html5.org","size":58833,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"cocos2d:develop","ref":"develop","sha":"39e53a863b3f663562c4f044f1bd50d782e4cc89","user":{"login":"cocos2d","id":234324,"avatar_url":"https://avatars.githubusercontent.com/u/234324?v=3","gravatar_id":"","url":"https://api.github.com/users/cocos2d","html_url":"https://github.com/cocos2d","followers_url":"https://api.github.com/users/cocos2d/followers","following_url":"https://api.github.com/users/cocos2d/following{/other_user}","gists_url":"https://api.github.com/users/cocos2d/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos2d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos2d/subscriptions","organizations_url":"https://api.github.com/users/cocos2d/orgs","repos_url":"https://api.github.com/users/cocos2d/repos","events_url":"https://api.github.com/users/cocos2d/events{/privacy}","received_events_url":"https://api.github.com/users/cocos2d/received_events","type":"Organization","site_admin":false},"repo":{"id":3224614,"name":"cocos2d-html5","full_name":"cocos2d/cocos2d-html5","owner":{"login":"cocos2d","id":234324,"avatar_url":"https://avatars.githubusercontent.com/u/234324?v=3","gravatar_id":"","url":"https://api.github.com/users/cocos2d","html_url":"https://github.com/cocos2d","followers_url":"https://api.github.com/users/cocos2d/followers","following_url":"https://api.github.com/users/cocos2d/following{/other_user}","gists_url":"https://api.github.com/users/cocos2d/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos2d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos2d/subscriptions","organizations_url":"https://api.github.com/users/cocos2d/orgs","repos_url":"https://api.github.com/users/cocos2d/repos","events_url":"https://api.github.com/users/cocos2d/events{/privacy}","received_events_url":"https://api.github.com/users/cocos2d/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cocos2d/cocos2d-html5","description":"cocos2d for Web Browsers. Built using JavaScript","fork":false,"url":"https://api.github.com/repos/cocos2d/cocos2d-html5","forks_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/forks","keys_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/teams","hooks_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/hooks","issue_events_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/issues/events{/number}","events_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/events","assignees_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/assignees{/user}","branches_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/branches{/branch}","tags_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/tags","blobs_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/git/refs{/sha}","trees_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/statuses/{sha}","languages_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/languages","stargazers_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/stargazers","contributors_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/contributors","subscribers_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/subscribers","subscription_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/subscription","commits_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/commits{/sha}","git_commits_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/git/commits{/sha}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/comments{/number}","issue_comment_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/issues/comments{/number}","contents_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/contents/{+path}","compare_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/merges","archive_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/downloads","issues_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/issues{/number}","pulls_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/pulls{/number}","milestones_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/milestones{/number}","notifications_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/labels{/name}","releases_url":"https://api.github.com/repos/cocos2d/cocos2d-html5/releases{/id}","created_at":"2012-01-20T07:31:59Z","updated_at":"2015-05-12T14:36:25Z","pushed_at":"2015-05-13T15:04:35Z","git_url":"git://github.com/cocos2d/cocos2d-html5.git","ssh_url":"git@github.com:cocos2d/cocos2d-html5.git","clone_url":"https://github.com/cocos2d/cocos2d-html5.git","svn_url":"https://github.com/cocos2d/cocos2d-html5","homepage":"http://www.cocos2d-html5.org","size":81359,"stargazers_count":1667,"watchers_count":1667,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":717,"mirror_url":null,"open_issues_count":101,"forks":717,"open_issues":101,"watchers":1667,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/cocos2d/cocos2d-html5/pulls/2886"},"html":{"href":"https://github.com/cocos2d/cocos2d-html5/pull/2886"},"issue":{"href":"https://api.github.com/repos/cocos2d/cocos2d-html5/issues/2886"},"comments":{"href":"https://api.github.com/repos/cocos2d/cocos2d-html5/issues/2886/comments"},"review_comments":{"href":"https://api.github.com/repos/cocos2d/cocos2d-html5/pulls/2886/comments"},"review_comment":{"href":"https://api.github.com/repos/cocos2d/cocos2d-html5/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cocos2d/cocos2d-html5/pulls/2886/commits"},"statuses":{"href":"https://api.github.com/repos/cocos2d/cocos2d-html5/statuses/5b2d8a474ee90db8a1fcd8128e90b914daa8336f"}}}}