Skip to content

Commit 6f6e0c6

Browse files
committed
Add prevent modifier to all click events
1 parent 70df8e2 commit 6f6e0c6

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

examples/questionnaire/Example.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<a
4141
ref="button"
4242
href="#"
43-
v-on:click="onSendData()"
43+
v-on:click.prevent="onSendData()"
4444
v-if="!submitted"
4545
role="button"
4646
aria-label="Press to submit"

examples/quiz/Example.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<a
3939
ref="button"
4040
href="#"
41-
v-on:click="onQuizSubmit()"
41+
v-on:click.prevent="onQuizSubmit()"
4242
v-if="!submitted"
4343
>
4444
<div class="o-btn-action">

src/components/FlowForm.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<slot name="completeButton">
3131
<!-- Default content for the "completeButton" slot -->
32-
<a ref="button" href="#" v-on:click="submit()" v-if="!submitted" role="button" v-bind:aria-label="language.ariaSubmitText">
32+
<a ref="button" href="#" v-on:click.prevent="submit()" v-if="!submitted" role="button" v-bind:aria-label="language.ariaSubmitText">
3333
<div class="o-btn-action">
3434
<span>{{ language.submitText }}</span>
3535
</div>
@@ -114,7 +114,6 @@
114114
115115
import FlowFormQuestion from './Question.vue'
116116
import LanguageModel from '../models/LanguageModel'
117-
118117
119118
export default {
120119
name: 'FlowForm',

src/components/Question.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
ref="button"
5454
href="#"
5555
v-if="showOkButton()"
56-
v-on:click="onEnter"
56+
v-on:click.prevent="onEnter"
5757
role ="button"
5858
v-bind:aria-label="language.ariaOk"
5959
>

src/components/QuestionTypes/MultipleChoiceType.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<ul class="f-radios" v-bind:class="{'f-multiple': question.multiple}" role="listbox">
44
<li
55
v-for="(option, index) in question.options"
6-
v-on:click="toggleAnswer(option)"
6+
v-on:click.prevent="toggleAnswer(option)"
77
v-bind:class="{'f-selected': option.selected}"
88
v-bind:key="'m' + index"
99
v-bind:aria-label="getLabel(index)"
@@ -15,7 +15,7 @@
1515
<li
1616
class="f-other"
1717
v-if="question.allowOther"
18-
v-on:click="startEditOther"
18+
v-on:click.prevent="startEditOther"
1919
v-bind:class="{'f-selected': question.other, 'f-focus': editingOther}"
2020
v-bind:aria-label="language.ariaTypeAnswer"
2121
role="option"

0 commit comments

Comments
 (0)