diff --git a/src/components/Questions/QuestionLong.vue b/src/components/Questions/QuestionLong.vue index f3ad1f9..cca5770 100644 --- a/src/components/Questions/QuestionLong.vue +++ b/src/components/Questions/QuestionLong.vue @@ -40,7 +40,8 @@ :maxlength="maxStringLengths.answerText" minlength="1" @input="onInput" - @keydown="autoSizeText" /> + @keypress="autoSizeText" + @keydown.ctrl.enter="onKeydownCtrlEnter" /> @@ -74,6 +75,9 @@ export default { textarea.style.cssText = 'height:auto; padding:0' textarea.style.cssText = `height: ${textarea.scrollHeight + 20}px` }, + onKeydownCtrlEnter(event) { + this.$emit('keydown', event) + }, }, } diff --git a/src/components/Questions/QuestionMultiple.vue b/src/components/Questions/QuestionMultiple.vue index b433942..bb411ad 100644 --- a/src/components/Questions/QuestionMultiple.vue +++ b/src/components/Questions/QuestionMultiple.vue @@ -46,7 +46,8 @@ :name="`${id}-answer`" :required="isRequired(answer.id)" :type="isUnique ? 'radio' : 'checkbox'" - @change="onChange($event, answer.id)"> + @change="onChange($event, answer.id)" + @keydown.enter.exact.prevent="onKeydownEnter">