Clicking 'Next' button does not go to next page
See original GitHub issueAre you requesting a feature, reporting a bug or asking a question?
Reporting a bug
What is the current behavior?
After updating to package v1.0.54, clicking the “Next” button does not go to the next page (also happening in 1.0.55).
What is the expected behavior?
Clicking the “Next” button should bring the survey to the next page.
How would you reproduce the current behavior (if this is a bug)?
This one’s a doozy… I’m not sure how to repro this, and I don’t see the issue happening when I locally build the example react survey after replacing the sample JSON with my own (seen below)… so I am really hoping the little info I found from investigating will be enough to guess what the issue might be:
-
When I git pulled the project, I built the package at various commits to use locally in my project, and found the commit that broke the Next button: https://github.com/surveyjs/surveyjs/commit/67fe99f151d2a2608e70b9101d10cbf401534afa (so in this commit and onwards, the “Next” button doesn’t work for me)
-
When debugging inside
handleNextClick
(the click event handler for the “Next” button) in reactSurveyNavigation.tsx:
- The first time I click the button,
this.survey.nextPage()
returns true - The 2nd time I click,
this.survey.nextPage()
returns false from this line:if (this.isEditMode && this.isCurrentPageHasErrors) return false
because the survey thinks the question has aAnswerRequiredError
(even though the input is valid)
I apologize for the lack of info, but thought I’d try to see if someone else can figure out what might be happening.
Provide the test code and the tested page URL (if applicable)
Test JSON
{
"pages": [{
"name": "page1",
"elements": [{
"type": "text",
"name": "question1",
"title": "How old are you?",
"isRequired": true,
"validators": [{
"type": "numeric",
"minValue": 18,
"maxValue": 99
}],
"placeHolder": "(years)"
}]
},
{
"name": "page2",
"elements": [{
"type": "radiogroup",
"name": "question2",
"title": "What is your sex?",
"isRequired": true,
"choices": [{
"value": "M",
"text": "Male"
},
{
"value": "F",
"text": "Female"
}
]
}]
}
]
}
Specify your
- browser: Chrome
- browser version: 70.0.3538.77
- surveyjs platform (angular or react or jquery or knockout or vue): react
- surveyjs version: 1.0.55
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (4 by maintainers)
Top GitHub Comments
@nwvaras @ekim-novus @lucasharada We have released new minor version. Please try it out.
Thank you, Andrew
Having the same problem with
survey-react: 1.0.55
. But works perfectly on version1.0.53
.