{"action":"created","issue":{"url":"https://api.github.com/repos/reactjs/react-modal/issues/540","repository_url":"https://api.github.com/repos/reactjs/react-modal","labels_url":"https://api.github.com/repos/reactjs/react-modal/issues/540/labels{/name}","comments_url":"https://api.github.com/repos/reactjs/react-modal/issues/540/comments","events_url":"https://api.github.com/repos/reactjs/react-modal/issues/540/events","html_url":"https://github.com/reactjs/react-modal/pull/540","id":267827259,"number":540,"title":"[Fixed issue #464]","user":{"login":"kloots","id":40818,"avatar_url":"https://avatars1.githubusercontent.com/u/40818?v=4","gravatar_id":"","url":"https://api.github.com/users/kloots","html_url":"https://github.com/kloots","followers_url":"https://api.github.com/users/kloots/followers","following_url":"https://api.github.com/users/kloots/following{/other_user}","gists_url":"https://api.github.com/users/kloots/gists{/gist_id}","starred_url":"https://api.github.com/users/kloots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kloots/subscriptions","organizations_url":"https://api.github.com/users/kloots/orgs","repos_url":"https://api.github.com/users/kloots/repos","events_url":"https://api.github.com/users/kloots/events{/privacy}","received_events_url":"https://api.github.com/users/kloots/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-10-23T21:43:12Z","updated_at":"2017-10-23T23:58:15Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/reactjs/react-modal/pulls/540","html_url":"https://github.com/reactjs/react-modal/pull/540","diff_url":"https://github.com/reactjs/react-modal/pull/540.diff","patch_url":"https://github.com/reactjs/react-modal/pull/540.patch"},"body":"Fixes #464.\r\n\r\nChanges proposed:\r\n- Adds a new prop `shouldReturnFocusAfterClose` allowing explicit control over if a modal should restore focus to the element that had focus prior to its displayed.\r\n- Does not try to restore focus if focus wasn't transferred to the modal in the first place (`shouldFocusAfterRender` was set to `false`)\r\n- Fixes a typo in the `Modal` props so that `shouldFocusAfter` is now correctly `shouldFocusAfterRender`\r\n- Fixes a number of line-length warnings\r\n\r\nAcceptance Checklist:\r\n- [x] All commits have been squashed to one.\r\n- [x] The commit message follows the guidelines in `CONTRIBUTING.md`.\r\n- [x] Documentation (README.md) and examples have been updated as needed.\r\n- [x] If this is a code change, a spec testing the functionality has been added.\r\n- [ ] If the commit message has [changed] or [removed], there is an upgrade path above.\r\n"},"comment":{"url":"https://api.github.com/repos/reactjs/react-modal/issues/comments/338830347","html_url":"https://github.com/reactjs/react-modal/pull/540#issuecomment-338830347","issue_url":"https://api.github.com/repos/reactjs/react-modal/issues/540","id":338830347,"user":{"login":"diasbruno","id":362368,"avatar_url":"https://avatars2.githubusercontent.com/u/362368?v=4","gravatar_id":"","url":"https://api.github.com/users/diasbruno","html_url":"https://github.com/diasbruno","followers_url":"https://api.github.com/users/diasbruno/followers","following_url":"https://api.github.com/users/diasbruno/following{/other_user}","gists_url":"https://api.github.com/users/diasbruno/gists{/gist_id}","starred_url":"https://api.github.com/users/diasbruno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diasbruno/subscriptions","organizations_url":"https://api.github.com/users/diasbruno/orgs","repos_url":"https://api.github.com/users/diasbruno/repos","events_url":"https://api.github.com/users/diasbruno/events{/privacy}","received_events_url":"https://api.github.com/users/diasbruno/received_events","type":"User","site_admin":false},"created_at":"2017-10-23T23:58:15Z","updated_at":"2017-10-23T23:58:15Z","author_association":"COLLABORATOR","body":"This line also needs a condition [ModalPortal.js#L151](https://github.com/reactjs/react-modal/blob/master/src/components/ModalPortal.js#L151), otherwise the `activeElement` will be pushed on the focus stack and might cause troubles when open/close other modals (unlikely but possible)."}}
{"actor":{"display_login":"diasbruno"}}