Skip to content

Commit e7e86d2

Browse files
committed
Add wrapper to multiple choice "other" option
1 parent 30ca4d5 commit e7e86d2

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

src/components/QuestionTypes/MultipleChoiceType.vue

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,24 @@
2525
v-bind:aria-label="language.ariaTypeAnswer"
2626
role="option"
2727
>
28-
<span class="f-key" v-if="!editingOther">{{ getToggleKey(question.options.length) }}</span>
29-
<input
30-
v-if="editingOther"
31-
v-model="question.other"
32-
type="text"
33-
ref="otherInput"
34-
v-on:blur="stopEditOther"
35-
v-on:keyup.enter.prevent="stopEditOther"
36-
v-on:keyup="onChangeOther"
37-
v-on:change="onChangeOther"
38-
maxlength="256"
39-
/>
40-
<span v-else-if="question.other" class="f-selected">
41-
<span class="f-label">{{ question.other }}</span>
42-
</span>
43-
<span v-else class="f-label">{{ language.otherPrompt }}</span>
28+
<div class="f-label-wrap">
29+
<span class="f-key" v-if="!editingOther">{{ getToggleKey(question.options.length) }}</span>
30+
<input
31+
v-if="editingOther"
32+
v-model="question.other"
33+
type="text"
34+
ref="otherInput"
35+
v-on:blur="stopEditOther"
36+
v-on:keyup.enter.prevent="stopEditOther"
37+
v-on:keyup="onChangeOther"
38+
v-on:change="onChangeOther"
39+
maxlength="256"
40+
/>
41+
<span v-else-if="question.other" class="f-selected">
42+
<span class="f-label">{{ question.other }}</span>
43+
</span>
44+
<span v-else class="f-label">{{ language.otherPrompt }}</span>
45+
</div>
4446
</li>
4547
</ul>
4648
</div>

0 commit comments

Comments
 (0)