{"action":"created","issue":{"url":"https://api.github.com/repos/surveyjs/surveyjs/issues/1444","repository_url":"https://api.github.com/repos/surveyjs/surveyjs","labels_url":"https://api.github.com/repos/surveyjs/surveyjs/issues/1444/labels{/name}","comments_url":"https://api.github.com/repos/surveyjs/surveyjs/issues/1444/comments","events_url":"https://api.github.com/repos/surveyjs/surveyjs/issues/1444/events","html_url":"https://github.com/surveyjs/surveyjs/issues/1444","id":382717687,"node_id":"MDU6SXNzdWUzODI3MTc2ODc=","number":1444,"title":"Radiogroup & Checkboxes not auto-focused when going to next page","user":{"login":"ekim-novus","id":44381166,"node_id":"MDQ6VXNlcjQ0MzgxMTY2","avatar_url":"https://avatars1.githubusercontent.com/u/44381166?v=4","gravatar_id":"","url":"https://api.github.com/users/ekim-novus","html_url":"https://github.com/ekim-novus","followers_url":"https://api.github.com/users/ekim-novus/followers","following_url":"https://api.github.com/users/ekim-novus/following{/other_user}","gists_url":"https://api.github.com/users/ekim-novus/gists{/gist_id}","starred_url":"https://api.github.com/users/ekim-novus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekim-novus/subscriptions","organizations_url":"https://api.github.com/users/ekim-novus/orgs","repos_url":"https://api.github.com/users/ekim-novus/repos","events_url":"https://api.github.com/users/ekim-novus/events{/privacy}","received_events_url":"https://api.github.com/users/ekim-novus/received_events","type":"User","site_admin":false},"labels":[{"id":247746343,"node_id":"MDU6TGFiZWwyNDc3NDYzNDM=","url":"https://api.github.com/repos/surveyjs/surveyjs/labels/bug","name":"bug","color":"fc2929","default":true},{"id":545413271,"node_id":"MDU6TGFiZWw1NDU0MTMyNzE=","url":"https://api.github.com/repos/surveyjs/surveyjs/labels/fixed","name":"fixed","color":"e99695","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-20T15:31:51Z","updated_at":"2018-11-21T15:20:03Z","closed_at":"2018-11-21T06:21:31Z","author_association":"NONE","body":"<!-- The easiest way to fix the issue is provide us with a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve). This should not be exactly your JSON or code. Just a small sample illustrating the issue. In this case we will be able to investigate it in our side and find the cause of the issue. -->\r\n\r\n\r\n### Are you requesting a feature, reporting a bug or asking a question?\r\n\r\nBug\r\n\r\n### What is the current behavior?\r\n\r\nCurrently in the new version 1.0.56, after going to the next page, the first question is not auto-focused if it's a radiogroup or checkbox group (instead it focuses the Next button).\r\n\r\n### What is the expected behavior?\r\n\r\nFirst choice should be auto-focused.\r\n\r\n### How would you reproduce the current behavior (if this is a bug)?\r\n\r\nIn the sample React survey in the `examples/react` folder, copy-paste the below JSON\r\n\r\n#### Provide the test code and the tested page URL (if applicable)\r\n\r\nTest JSON\r\n\r\n```\r\n{\r\n\t\"pages\": [{\r\n\t\t\t\"name\": \"page1\",\r\n\t\t\t\"elements\": [{\r\n\t\t\t\t\"type\": \"text\",\r\n\t\t\t\t\"name\": \"CC_01\",\r\n\t\t\t\t\"title\": \"How old are you?\",\r\n\t\t\t\t\"isRequired\": true,\r\n\t\t\t\t\"validators\": [{\r\n\t\t\t\t\t\"type\": \"numeric\",\r\n\t\t\t\t\t\"minValue\": 18,\r\n\t\t\t\t\t\"maxValue\": 99\r\n\t\t\t\t}],\r\n\t\t\t\t\"placeHolder\": \"(years)\"\r\n\t\t\t}]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"name\": \"page2\",\r\n\t\t\t\"elements\": [{\r\n\t\t\t\t\"type\": \"radiogroup\",\r\n\t\t\t\t\"name\": \"CC_02\",\r\n\t\t\t\t\"title\": \"What is your sex?\",\r\n\t\t\t\t\"isRequired\": true,\r\n\t\t\t\t\"choices\": [{\r\n\t\t\t\t\t\t\"value\": \"M\",\r\n\t\t\t\t\t\t\"text\": \"Male\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\"value\": \"F\",\r\n\t\t\t\t\t\t\"text\": \"Female\"\r\n\t\t\t\t\t}\r\n\t\t\t\t]\r\n\t\t\t}]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"name\": \"page3\",\r\n\t\t\t\"elements\": [{\r\n\t\t\t\t\"type\": \"checkbox\",\r\n\t\t\t\t\"name\": \"CC_03\",\r\n\t\t\t\t\"title\": \"Favourite colours?\",\r\n\t\t\t\t\"isRequired\": true,\r\n\t\t\t\t\"choices\": [{\r\n\t\t\t\t\t\t\"value\": \"B\",\r\n\t\t\t\t\t\t\"text\": \"Blue\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\"value\": \"R\",\r\n\t\t\t\t\t\t\"text\": \"Red\"\r\n\t\t\t\t\t}\r\n\t\t\t\t]\r\n\t\t\t}]\r\n\t\t}\r\n\t]\r\n}\r\n\r\n```\r\n\r\n### Specify your\r\n\r\n* browser: Chrome\r\n* browser version: 70.0.3538.77\r\n* surveyjs platform (angular or react or jquery or knockout or vue): react\r\n* surveyjs version: 1.0.56\r\n"},"comment":{"url":"https://api.github.com/repos/surveyjs/surveyjs/issues/comments/440702247","html_url":"https://github.com/surveyjs/surveyjs/issues/1444#issuecomment-440702247","issue_url":"https://api.github.com/repos/surveyjs/surveyjs/issues/1444","id":440702247,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDcwMjI0Nw==","user":{"login":"ekim-novus","id":44381166,"node_id":"MDQ6VXNlcjQ0MzgxMTY2","avatar_url":"https://avatars1.githubusercontent.com/u/44381166?v=4","gravatar_id":"","url":"https://api.github.com/users/ekim-novus","html_url":"https://github.com/ekim-novus","followers_url":"https://api.github.com/users/ekim-novus/followers","following_url":"https://api.github.com/users/ekim-novus/following{/other_user}","gists_url":"https://api.github.com/users/ekim-novus/gists{/gist_id}","starred_url":"https://api.github.com/users/ekim-novus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekim-novus/subscriptions","organizations_url":"https://api.github.com/users/ekim-novus/orgs","repos_url":"https://api.github.com/users/ekim-novus/repos","events_url":"https://api.github.com/users/ekim-novus/events{/privacy}","received_events_url":"https://api.github.com/users/ekim-novus/received_events","type":"User","site_admin":false},"created_at":"2018-11-21T15:20:03Z","updated_at":"2018-11-21T15:20:03Z","author_association":"NONE","body":"Hey @tsv2013 , I tried the latest commit:  https://github.com/surveyjs/surveyjs/commit/a768489b9bee60292ce8e70868c6cb56b38d8a0c but the radio/checkboxes don't get auto-focused in my survey. However, the example React survey works now.\r\n\r\nWhen I debug my local project I can see that `onCurrentPageChangedHandler` gets added in `setSurveyEvents()` from reactSurvey.tsx, but for some reason the handler doesn't get called when `currentPageChanged()` is called in survey.ts. So in `componentDidUpdate` in reactSurvey.tsx, `isCurrentPageChanged` is false."}}
{"actor":{"display_login":"ekim-novus"}}