diff --git a/src/components/FlowForm.vue b/src/components/FlowForm.vue index a340552a..ff781da4 100644 --- a/src/components/FlowForm.vue +++ b/src/components/FlowForm.vue @@ -148,7 +148,6 @@ window.addEventListener('beforeunload', this.onBeforeUnload) this.setQuestions() - this.focusActiveQuestion() }, beforeDestroy() { document.removeEventListener('keyup', this.onKeyListener, true) @@ -394,8 +393,6 @@ if (this.activeQuestionIndex > 0) { --this.activeQuestionIndex - - this.focusActiveQuestion() } this.reverse = true @@ -414,16 +411,6 @@ this.reverse = false }, - focusActiveQuestion() { - this.$nextTick(() => { - const q = this.activeQuestionComponent() - - if (q) { - q.focusField() - } - }) - }, - /** * Removes focus from the currently focused DOM element. */ diff --git a/src/components/Question.vue b/src/components/Question.vue index bd23b9bc..0753a59e 100644 --- a/src/components/Question.vue +++ b/src/components/Question.vue @@ -1,8 +1,8 @@ // Single question template and logic diff --git a/src/mixins/IsMobile.js b/src/mixins/IsMobile.js new file mode 100644 index 00000000..0dca3f2d --- /dev/null +++ b/src/mixins/IsMobile.js @@ -0,0 +1,7 @@ +export const IsMobile = { + data() { + return { + isMobile: !!navigator.userAgent.match(/android|iphone|ipad|ipod/i) + } + } +} \ No newline at end of file