{"action":"created","issue":{"url":"https://api.github.com/repos/erikras/redux-form/issues/1186","repository_url":"https://api.github.com/repos/erikras/redux-form","labels_url":"https://api.github.com/repos/erikras/redux-form/issues/1186/labels{/name}","comments_url":"https://api.github.com/repos/erikras/redux-form/issues/1186/comments","events_url":"https://api.github.com/repos/erikras/redux-form/issues/1186/events","html_url":"https://github.com/erikras/redux-form/issues/1186","id":161188377,"number":1186,"title":"focus() method breaks input","user":{"login":"andrewQwer","id":710513,"avatar_url":"https://avatars.githubusercontent.com/u/710513?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewQwer","html_url":"https://github.com/andrewQwer","followers_url":"https://api.github.com/users/andrewQwer/followers","following_url":"https://api.github.com/users/andrewQwer/following{/other_user}","gists_url":"https://api.github.com/users/andrewQwer/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewQwer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewQwer/subscriptions","organizations_url":"https://api.github.com/users/andrewQwer/orgs","repos_url":"https://api.github.com/users/andrewQwer/repos","events_url":"https://api.github.com/users/andrewQwer/events{/privacy}","received_events_url":"https://api.github.com/users/andrewQwer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-06-20T12:54:46Z","updated_at":"2016-06-21T07:46:04Z","closed_at":null,"body":"Hi guys,\r\n\r\nWhen I try to focus my component it loses its value and shows validation message.\r\nThis is how I initialize my input:\r\n```javascript\r\n<input type=\"text\"\r\n                           id='name'\r\n                           className=\"form-control width240\"\r\n                           placeholder=\"Enter field name\"\r\n                           ref={function(input) {\r\n                               if (input)\r\n                                   input.focus();\r\n                           }}\r\n                           {...name}\r\n\r\n                    />\r\n```\r\n\r\nAnd this is the list of actions that form triggers:\r\n![image](https://cloud.githubusercontent.com/assets/710513/16194816/3cba5842-36ff-11e6-87f9-df4651ed68e9.png)\r\nI don't know why input value becomes empty"},"comment":{"url":"https://api.github.com/repos/erikras/redux-form/issues/comments/227365239","html_url":"https://github.com/erikras/redux-form/issues/1186#issuecomment-227365239","issue_url":"https://api.github.com/repos/erikras/redux-form/issues/1186","id":227365239,"user":{"login":"andrewQwer","id":710513,"avatar_url":"https://avatars.githubusercontent.com/u/710513?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewQwer","html_url":"https://github.com/andrewQwer","followers_url":"https://api.github.com/users/andrewQwer/followers","following_url":"https://api.github.com/users/andrewQwer/following{/other_user}","gists_url":"https://api.github.com/users/andrewQwer/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewQwer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewQwer/subscriptions","organizations_url":"https://api.github.com/users/andrewQwer/orgs","repos_url":"https://api.github.com/users/andrewQwer/repos","events_url":"https://api.github.com/users/andrewQwer/events{/privacy}","received_events_url":"https://api.github.com/users/andrewQwer/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T07:46:04Z","updated_at":"2016-06-21T07:46:04Z","body":"Another problem is that I can't remove focus from this field because series of FOCUS/BLUR actions occurs and input remains focused.\r\nBut I was able to workaround this issue:\r\n```javascript\r\ncomponentDidMount: function () {\r\n        setTimeout(()=> {\r\n            this.refs.focusedField.focus()\r\n        }, 0);\r\n    },\r\n```\r\nWithout `setTimout` field stays unfocused."}}
{"actor":{"display_login":"andrewQwer"}}