Bug: When using nextStepOnAnswer if an answer is double clicked is skips too many questions
coxlr opened this issue · 1 comments
Describe the bug
When setting nextStepOnAnswer to true if an answer option is then clicked multiple times, it skips multiple questions.
To Reproduce
For the support-page example in Example.vue if you set the first question to use nextStepOnAnswer as true, and then click an answer option multiple times, it will trigger the nextStepOnAnswer action multiple times and cause too many questions to be skipped.
questions: [
{
type: 'multiplechoice',
id: 'multiple_choice',
tagline: 'Welcome to our demo support page!',
title: 'Hi 👋, how can we help you today?',
multiple: false,
required: true,
helpTextShow: false,
options: [
{
label: 'I have a technical issue',
value: 'technical_issue'
},
{
label: 'I wish to check my ticket status',
value: 'enter_ticket'
},
],
jump: {
technical_issue: 'technical_issue',
enter_ticket: 'enter_ticket'
},
model: '',
nextStepOnAnswer: true, //add this line
},
...
],
Expected behavior
The nextStepOnAnswer action should only be triggered once for a question, if an answer option is clicked multiple times the nextStepOnAnswer action shouldn't be triggered each time. This could potentially be resolved by disabling the question form once an answer is selected when nextStepOnAnswer is set as true till the next question has rendered.
Screenshots
Here is a video showing what currently happens, I have shown an example where each answer option on the first question is double clicked which then causes the next question to also be be skipped without being answered.
Screen.Recording.2021-05-13.at.10.57.10.AM.mp4
Desktop (please complete the following information):
- Device: MacBook Pro
- OS: IOS
- Browser chrome
- Version 90.0.4430.212 (Official Build) (x86_64)