{"action":"closed","number":103,"pull_request":{"url":"https://api.github.com/repos/root-two/react-native-drawer/pulls/103","id":60605612,"html_url":"https://github.com/root-two/react-native-drawer/pull/103","diff_url":"https://github.com/root-two/react-native-drawer/pull/103.diff","patch_url":"https://github.com/root-two/react-native-drawer/pull/103.patch","issue_url":"https://api.github.com/repos/root-two/react-native-drawer/issues/103","number":103,"state":"closed","locked":false,"title":"Capture main view touch events when drawer is open","user":{"login":"realjamie","id":5363036,"avatar_url":"https://avatars.githubusercontent.com/u/5363036?v=3","gravatar_id":"","url":"https://api.github.com/users/realjamie","html_url":"https://github.com/realjamie","followers_url":"https://api.github.com/users/realjamie/followers","following_url":"https://api.github.com/users/realjamie/following{/other_user}","gists_url":"https://api.github.com/users/realjamie/gists{/gist_id}","starred_url":"https://api.github.com/users/realjamie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realjamie/subscriptions","organizations_url":"https://api.github.com/users/realjamie/orgs","repos_url":"https://api.github.com/users/realjamie/repos","events_url":"https://api.github.com/users/realjamie/events{/privacy}","received_events_url":"https://api.github.com/users/realjamie/received_events","type":"User","site_admin":false},"body":"In this PR I tried to solve this issue: https://github.com/root-two/react-native-drawer/issues/68\r\n\r\nMy idea is to let the main-view-container capture the touch-events when the drawer is open. In the original codes, drawer-container and main-view-container shared the same `onStartShouldSetPanResponder`, `onStartShouldSetPanResponderCapture`. This was not correct.\r\n\r\nWhen the drawer is open, the drawer-container should not capture the touch-events, however, the main-view-container SHOULD capture the touch-events in order to block touches from child components on the main-view-container. Thus, the key changes I made in this PR is in `processShouldSet()`:\r\n```\r\n  if (inMask) {\r\n      let toggled = this.processTapGestures()\r\n      if (toggled) return viewType === VIEW_TYPE_DRAWER ? false : true  // The key change I made\r\n      if (this.props.captureGestures && this.props.acceptPan) return true\r\n    }\r\n```\r\n\r\nThe original logics are quite complicated so I'm not sure whether my changes break anything, though my changes are simple. Would like to ask @rt2zz to verify that! It works well on my drawer:\r\n  ```\r\n    <Drawer\r\n        acceptPan\r\n        captureGestures\r\n        content={this._renderMenu()}\r\n        negotiatePan={false}\r\n        onClose={this.props.onClose}\r\n        onOpen={this.props.onOpen}\r\n        openDrawerOffset={0.1}\r\n        panCloseMask={1}\r\n        panOpenMask={0}\r\n        panStartCompensation\r\n        ref=\"drawer\"\r\n        styles={stylesRaw.drawer}\r\n        tapToClose\r\n        type=\"displace\"\r\n        tweenDuration={350}\r\n        tweenHandler={this._handleTween}\r\n        tweenEasing={'linear'}>\r\n          {this.props.children}\r\n      </Drawer>\r\n```","created_at":"2016-02-25T00:40:39Z","updated_at":"2016-03-03T02:55:30Z","closed_at":"2016-03-03T02:55:30Z","merged_at":"2016-03-03T02:55:30Z","merge_commit_sha":"aa8590a4d72c8769f11ed21f42d8eb7d3b61a9d5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/root-two/react-native-drawer/pulls/103/commits","review_comments_url":"https://api.github.com/repos/root-two/react-native-drawer/pulls/103/comments","review_comment_url":"https://api.github.com/repos/root-two/react-native-drawer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/root-two/react-native-drawer/issues/103/comments","statuses_url":"https://api.github.com/repos/root-two/react-native-drawer/statuses/23f70b90786e82510aa6a6bfc9a6957777f3dfb2","head":{"label":"realjamie:master","ref":"master","sha":"23f70b90786e82510aa6a6bfc9a6957777f3dfb2","user":{"login":"realjamie","id":5363036,"avatar_url":"https://avatars.githubusercontent.com/u/5363036?v=3","gravatar_id":"","url":"https://api.github.com/users/realjamie","html_url":"https://github.com/realjamie","followers_url":"https://api.github.com/users/realjamie/followers","following_url":"https://api.github.com/users/realjamie/following{/other_user}","gists_url":"https://api.github.com/users/realjamie/gists{/gist_id}","starred_url":"https://api.github.com/users/realjamie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realjamie/subscriptions","organizations_url":"https://api.github.com/users/realjamie/orgs","repos_url":"https://api.github.com/users/realjamie/repos","events_url":"https://api.github.com/users/realjamie/events{/privacy}","received_events_url":"https://api.github.com/users/realjamie/received_events","type":"User","site_admin":false},"repo":{"id":52034323,"name":"react-native-drawer","full_name":"realjamie/react-native-drawer","owner":{"login":"realjamie","id":5363036,"avatar_url":"https://avatars.githubusercontent.com/u/5363036?v=3","gravatar_id":"","url":"https://api.github.com/users/realjamie","html_url":"https://github.com/realjamie","followers_url":"https://api.github.com/users/realjamie/followers","following_url":"https://api.github.com/users/realjamie/following{/other_user}","gists_url":"https://api.github.com/users/realjamie/gists{/gist_id}","starred_url":"https://api.github.com/users/realjamie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realjamie/subscriptions","organizations_url":"https://api.github.com/users/realjamie/orgs","repos_url":"https://api.github.com/users/realjamie/repos","events_url":"https://api.github.com/users/realjamie/events{/privacy}","received_events_url":"https://api.github.com/users/realjamie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/realjamie/react-native-drawer","description":"React Native Drawer","fork":true,"url":"https://api.github.com/repos/realjamie/react-native-drawer","forks_url":"https://api.github.com/repos/realjamie/react-native-drawer/forks","keys_url":"https://api.github.com/repos/realjamie/react-native-drawer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realjamie/react-native-drawer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realjamie/react-native-drawer/teams","hooks_url":"https://api.github.com/repos/realjamie/react-native-drawer/hooks","issue_events_url":"https://api.github.com/repos/realjamie/react-native-drawer/issues/events{/number}","events_url":"https://api.github.com/repos/realjamie/react-native-drawer/events","assignees_url":"https://api.github.com/repos/realjamie/react-native-drawer/assignees{/user}","branches_url":"https://api.github.com/repos/realjamie/react-native-drawer/branches{/branch}","tags_url":"https://api.github.com/repos/realjamie/react-native-drawer/tags","blobs_url":"https://api.github.com/repos/realjamie/react-native-drawer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realjamie/react-native-drawer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realjamie/react-native-drawer/git/refs{/sha}","trees_url":"https://api.github.com/repos/realjamie/react-native-drawer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realjamie/react-native-drawer/statuses/{sha}","languages_url":"https://api.github.com/repos/realjamie/react-native-drawer/languages","stargazers_url":"https://api.github.com/repos/realjamie/react-native-drawer/stargazers","contributors_url":"https://api.github.com/repos/realjamie/react-native-drawer/contributors","subscribers_url":"https://api.github.com/repos/realjamie/react-native-drawer/subscribers","subscription_url":"https://api.github.com/repos/realjamie/react-native-drawer/subscription","commits_url":"https://api.github.com/repos/realjamie/react-native-drawer/commits{/sha}","git_commits_url":"https://api.github.com/repos/realjamie/react-native-drawer/git/commits{/sha}","comments_url":"https://api.github.com/repos/realjamie/react-native-drawer/comments{/number}","issue_comment_url":"https://api.github.com/repos/realjamie/react-native-drawer/issues/comments{/number}","contents_url":"https://api.github.com/repos/realjamie/react-native-drawer/contents/{+path}","compare_url":"https://api.github.com/repos/realjamie/react-native-drawer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realjamie/react-native-drawer/merges","archive_url":"https://api.github.com/repos/realjamie/react-native-drawer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realjamie/react-native-drawer/downloads","issues_url":"https://api.github.com/repos/realjamie/react-native-drawer/issues{/number}","pulls_url":"https://api.github.com/repos/realjamie/react-native-drawer/pulls{/number}","milestones_url":"https://api.github.com/repos/realjamie/react-native-drawer/milestones{/number}","notifications_url":"https://api.github.com/repos/realjamie/react-native-drawer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realjamie/react-native-drawer/labels{/name}","releases_url":"https://api.github.com/repos/realjamie/react-native-drawer/releases{/id}","deployments_url":"https://api.github.com/repos/realjamie/react-native-drawer/deployments","created_at":"2016-02-18T19:53:15Z","updated_at":"2016-02-18T19:53:16Z","pushed_at":"2016-02-25T00:20:33Z","git_url":"git://github.com/realjamie/react-native-drawer.git","ssh_url":"git@github.com:realjamie/react-native-drawer.git","clone_url":"https://github.com/realjamie/react-native-drawer.git","svn_url":"https://github.com/realjamie/react-native-drawer","homepage":null,"size":9437,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"root-two:master","ref":"master","sha":"7a1a38ab0cb357bd0f280d269a8b0ebb7585fb1c","user":{"login":"root-two","id":16145689,"avatar_url":"https://avatars.githubusercontent.com/u/16145689?v=3","gravatar_id":"","url":"https://api.github.com/users/root-two","html_url":"https://github.com/root-two","followers_url":"https://api.github.com/users/root-two/followers","following_url":"https://api.github.com/users/root-two/following{/other_user}","gists_url":"https://api.github.com/users/root-two/gists{/gist_id}","starred_url":"https://api.github.com/users/root-two/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/root-two/subscriptions","organizations_url":"https://api.github.com/users/root-two/orgs","repos_url":"https://api.github.com/users/root-two/repos","events_url":"https://api.github.com/users/root-two/events{/privacy}","received_events_url":"https://api.github.com/users/root-two/received_events","type":"Organization","site_admin":false},"repo":{"id":33797700,"name":"react-native-drawer","full_name":"root-two/react-native-drawer","owner":{"login":"root-two","id":16145689,"avatar_url":"https://avatars.githubusercontent.com/u/16145689?v=3","gravatar_id":"","url":"https://api.github.com/users/root-two","html_url":"https://github.com/root-two","followers_url":"https://api.github.com/users/root-two/followers","following_url":"https://api.github.com/users/root-two/following{/other_user}","gists_url":"https://api.github.com/users/root-two/gists{/gist_id}","starred_url":"https://api.github.com/users/root-two/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/root-two/subscriptions","organizations_url":"https://api.github.com/users/root-two/orgs","repos_url":"https://api.github.com/users/root-two/repos","events_url":"https://api.github.com/users/root-two/events{/privacy}","received_events_url":"https://api.github.com/users/root-two/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/root-two/react-native-drawer","description":"React Native Drawer","fork":false,"url":"https://api.github.com/repos/root-two/react-native-drawer","forks_url":"https://api.github.com/repos/root-two/react-native-drawer/forks","keys_url":"https://api.github.com/repos/root-two/react-native-drawer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/root-two/react-native-drawer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/root-two/react-native-drawer/teams","hooks_url":"https://api.github.com/repos/root-two/react-native-drawer/hooks","issue_events_url":"https://api.github.com/repos/root-two/react-native-drawer/issues/events{/number}","events_url":"https://api.github.com/repos/root-two/react-native-drawer/events","assignees_url":"https://api.github.com/repos/root-two/react-native-drawer/assignees{/user}","branches_url":"https://api.github.com/repos/root-two/react-native-drawer/branches{/branch}","tags_url":"https://api.github.com/repos/root-two/react-native-drawer/tags","blobs_url":"https://api.github.com/repos/root-two/react-native-drawer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/root-two/react-native-drawer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/root-two/react-native-drawer/git/refs{/sha}","trees_url":"https://api.github.com/repos/root-two/react-native-drawer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/root-two/react-native-drawer/statuses/{sha}","languages_url":"https://api.github.com/repos/root-two/react-native-drawer/languages","stargazers_url":"https://api.github.com/repos/root-two/react-native-drawer/stargazers","contributors_url":"https://api.github.com/repos/root-two/react-native-drawer/contributors","subscribers_url":"https://api.github.com/repos/root-two/react-native-drawer/subscribers","subscription_url":"https://api.github.com/repos/root-two/react-native-drawer/subscription","commits_url":"https://api.github.com/repos/root-two/react-native-drawer/commits{/sha}","git_commits_url":"https://api.github.com/repos/root-two/react-native-drawer/git/commits{/sha}","comments_url":"https://api.github.com/repos/root-two/react-native-drawer/comments{/number}","issue_comment_url":"https://api.github.com/repos/root-two/react-native-drawer/issues/comments{/number}","contents_url":"https://api.github.com/repos/root-two/react-native-drawer/contents/{+path}","compare_url":"https://api.github.com/repos/root-two/react-native-drawer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/root-two/react-native-drawer/merges","archive_url":"https://api.github.com/repos/root-two/react-native-drawer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/root-two/react-native-drawer/downloads","issues_url":"https://api.github.com/repos/root-two/react-native-drawer/issues{/number}","pulls_url":"https://api.github.com/repos/root-two/react-native-drawer/pulls{/number}","milestones_url":"https://api.github.com/repos/root-two/react-native-drawer/milestones{/number}","notifications_url":"https://api.github.com/repos/root-two/react-native-drawer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/root-two/react-native-drawer/labels{/name}","releases_url":"https://api.github.com/repos/root-two/react-native-drawer/releases{/id}","deployments_url":"https://api.github.com/repos/root-two/react-native-drawer/deployments","created_at":"2015-04-12T00:34:59Z","updated_at":"2016-03-03T02:46:18Z","pushed_at":"2016-03-03T02:55:30Z","git_url":"git://github.com/root-two/react-native-drawer.git","ssh_url":"git@github.com:root-two/react-native-drawer.git","clone_url":"https://github.com/root-two/react-native-drawer.git","svn_url":"https://github.com/root-two/react-native-drawer","homepage":null,"size":9532,"stargazers_count":407,"watchers_count":407,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":55,"mirror_url":null,"open_issues_count":29,"forks":55,"open_issues":29,"watchers":407,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/root-two/react-native-drawer/pulls/103"},"html":{"href":"https://github.com/root-two/react-native-drawer/pull/103"},"issue":{"href":"https://api.github.com/repos/root-two/react-native-drawer/issues/103"},"comments":{"href":"https://api.github.com/repos/root-two/react-native-drawer/issues/103/comments"},"review_comments":{"href":"https://api.github.com/repos/root-two/react-native-drawer/pulls/103/comments"},"review_comment":{"href":"https://api.github.com/repos/root-two/react-native-drawer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/root-two/react-native-drawer/pulls/103/commits"},"statuses":{"href":"https://api.github.com/repos/root-two/react-native-drawer/statuses/23f70b90786e82510aa6a6bfc9a6957777f3dfb2"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"rt2zz","id":2302315,"avatar_url":"https://avatars.githubusercontent.com/u/2302315?v=3","gravatar_id":"","url":"https://api.github.com/users/rt2zz","html_url":"https://github.com/rt2zz","followers_url":"https://api.github.com/users/rt2zz/followers","following_url":"https://api.github.com/users/rt2zz/following{/other_user}","gists_url":"https://api.github.com/users/rt2zz/gists{/gist_id}","starred_url":"https://api.github.com/users/rt2zz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rt2zz/subscriptions","organizations_url":"https://api.github.com/users/rt2zz/orgs","repos_url":"https://api.github.com/users/rt2zz/repos","events_url":"https://api.github.com/users/rt2zz/events{/privacy}","received_events_url":"https://api.github.com/users/rt2zz/received_events","type":"User","site_admin":false},"comments":2,"review_comments":4,"commits":1,"additions":21,"deletions":12,"changed_files":1}}