diff --git a/src/components/QuestionTypes/MultipleChoiceType.vue b/src/components/QuestionTypes/MultipleChoiceType.vue index ee1c8db..adcd17e 100644 --- a/src/components/QuestionTypes/MultipleChoiceType.vue +++ b/src/components/QuestionTypes/MultipleChoiceType.vue @@ -90,7 +90,7 @@ } } }, - + methods: { addKeyListener() { this.removeKeyListener() @@ -144,16 +144,14 @@ this.question.other = this.dataValue = null this.setAnswer(this.dataValue) } - for (let i = 0; i < this.question.options.length; i++) { let o = this.question.options[i] - if (o.selected) { + if (o.selected && o !== option) { this._toggleAnswer(o) } } } - this._toggleAnswer(option) }, @@ -174,7 +172,7 @@ this.dataValue = option.selected ? optionValue : null } - + if (this.isValid() && this.question.nextStepOnAnswer && !this.question.multiple && !this.disabled) { this.$emit('next') } @@ -225,7 +223,7 @@ this.setAnswer(this.dataValue) } }, - + stopEditOther() { this.editingOther = false } diff --git a/vue.config.js b/vue.config.js index fe9a26c..d1ff9fa 100644 --- a/vue.config.js +++ b/vue.config.js @@ -7,7 +7,7 @@ module.exports = { publicPath: '', pages: { index: { - // Replace with your .js entry file path. + // Replace with your .js entry file path. // To see the quiz example, use 'examples/quiz/main.js' // To see the support page example, use 'examples/support-page/main.js' entry: entry || 'examples/questionnaire/main.js', @@ -15,4 +15,4 @@ module.exports = { filename: 'index.html' } } -} \ No newline at end of file +}