{"action":"created","issue":{"url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/541","repository_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap","labels_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/541/labels{/name}","comments_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/541/comments","events_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/541/events","html_url":"https://github.com/react-bootstrap/react-bootstrap/issues/541","id":69494933,"number":541,"title":"Click on MenuItem doesn't hide the dropdown menu?","user":{"login":"agile116","id":11846035,"avatar_url":"https://avatars.githubusercontent.com/u/11846035?v=3","gravatar_id":"","url":"https://api.github.com/users/agile116","html_url":"https://github.com/agile116","followers_url":"https://api.github.com/users/agile116/followers","following_url":"https://api.github.com/users/agile116/following{/other_user}","gists_url":"https://api.github.com/users/agile116/gists{/gist_id}","starred_url":"https://api.github.com/users/agile116/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agile116/subscriptions","organizations_url":"https://api.github.com/users/agile116/orgs","repos_url":"https://api.github.com/users/agile116/repos","events_url":"https://api.github.com/users/agile116/events{/privacy}","received_events_url":"https://api.github.com/users/agile116/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2015-04-20T02:54:58Z","updated_at":"2016-12-08T18:49:58Z","closed_at":"2015-04-20T19:27:01Z","body":"HI All,\nI created the following DropdownButton, but the dropdown doesn't get closed when I click either of the MenuItem. What happened?\nDropdownButton\n  MenuItem>Experts</MenuItem\n  MenuItem>White Papers</MenuItem>\n  MenuItem id='solution' eventKey='3' onClick={this.props.onSelection}>Solutions</MenuItem>\n/DropdownButton\n"},"comment":{"url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/comments/265821331","html_url":"https://github.com/react-bootstrap/react-bootstrap/issues/541#issuecomment-265821331","issue_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/541","id":265821331,"user":{"login":"alexkb0009","id":10673737,"avatar_url":"https://avatars.githubusercontent.com/u/10673737?v=3","gravatar_id":"","url":"https://api.github.com/users/alexkb0009","html_url":"https://github.com/alexkb0009","followers_url":"https://api.github.com/users/alexkb0009/followers","following_url":"https://api.github.com/users/alexkb0009/following{/other_user}","gists_url":"https://api.github.com/users/alexkb0009/gists{/gist_id}","starred_url":"https://api.github.com/users/alexkb0009/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexkb0009/subscriptions","organizations_url":"https://api.github.com/users/alexkb0009/orgs","repos_url":"https://api.github.com/users/alexkb0009/repos","events_url":"https://api.github.com/users/alexkb0009/events{/privacy}","received_events_url":"https://api.github.com/users/alexkb0009/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T18:49:58Z","updated_at":"2016-12-08T18:49:58Z","body":"Have encountered & addressed (as of v0.30.7) w/ workaround by adding this in my onSelect handler: \r\n`document.dispatchEvent(new MouseEvent('click'));`\r\n\r\nBecause dropdown becomes hidden after mouse click anywhere on page, this seems to emulate that decently enough. Issue seems to be that the internal handleClick method of MenuItem seems to call event.preventDefault() before running the onSelect callback/handler which also prevents click event from bubbling up and closing the NavDropdown."}}
{"actor":{"display_login":"alexkb0009"}}