Browse Source

fix(nc-gui): survery form - disable on enter move to next question in mobile view (#8191)

pull/8193/head
Ramesh Mane 9 months ago committed by GitHub
parent
commit
8b58c35c9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 11
      packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/survey.vue

11
packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/survey.vue

@ -226,13 +226,17 @@ const showSubmitConfirmModal = async () => {
} }
onKeyStroke(['ArrowLeft', 'ArrowDown'], () => { onKeyStroke(['ArrowLeft', 'ArrowDown'], () => {
if (isMobileMode.value) return
goPrevious(AnimationTarget.ArrowLeft) goPrevious(AnimationTarget.ArrowLeft)
}) })
onKeyStroke(['ArrowRight', 'ArrowUp'], () => { onKeyStroke(['ArrowRight', 'ArrowUp'], () => {
if (isMobileMode.value) return
goNext(AnimationTarget.ArrowRight) goNext(AnimationTarget.ArrowRight)
}) })
onKeyStroke(['Enter'], async (e) => { onKeyStroke(['Enter'], async (e) => {
if (submitted.value) return if (isMobileMode.value || submitted.value) return
if (!isStarted.value && !submitted.value) { if (!isStarted.value && !submitted.value) {
onStart() onStart()
@ -441,7 +445,10 @@ onMounted(() => {
</div> </div>
</template> </template>
<div v-if="field.uidt === UITypes.LongText" class="text-sm text-gray-500 flex flex-wrap items-center"> <div
v-if="field.uidt === UITypes.LongText"
class="hidden text-sm text-gray-500 md:flex flex-wrap items-center"
>
{{ $t('general.shift') }} <MdiAppleKeyboardShift class="mx-1 text-primary" /> + {{ $t('general.enter') }} {{ $t('general.shift') }} <MdiAppleKeyboardShift class="mx-1 text-primary" /> + {{ $t('general.enter') }}
<MaterialSymbolsKeyboardReturn class="mx-1 text-primary" /> {{ $t('msg.info.makeLineBreak') }} <MaterialSymbolsKeyboardReturn class="mx-1 text-primary" /> {{ $t('msg.info.makeLineBreak') }}
</div> </div>

Loading…
Cancel
Save