File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 1616 v-bind:reverse =" reverse"
1717 v-bind:disabled =" disabled"
1818 v-on:disable =" setDisabled"
19+ v-bind:autofocus =" autofocus"
1920 />
2021
2122 <slot ></slot >
170171 default: false
171172 },
172173 timerStartStep: [String , Number ],
173- timerStopStep: [String , Number ]
174+ timerStopStep: [String , Number ],
175+ autofocus: {
176+ type: Boolean ,
177+ default: true
178+ }
174179 },
175180
176181 mixins: [
634639 const q = this .activeQuestionComponent ()
635640
636641 if (q) {
637- q .focusField ()
642+ this . autofocus && q .focusField ()
638643 this .activeQuestionIndex = q .question .index
639644 } else if (this .isOnLastStep ) {
640645 // No more questions left - set "completed" to true
Original file line number Diff line number Diff line change 150150 disabled: {
151151 type: Boolean ,
152152 default: false
153+ },
154+ autofocus: {
155+ type: Boolean ,
156+ default: true
153157 }
154158 },
155159
166170 },
167171
168172 mounted () {
169- this .focusField ()
173+ this .autofocus && this . focusField ()
170174
171175 this .dataValue = this .question .answer
172176
188192 },
189193
190194 onAnimationEnd () {
191- this .focusField ()
195+ this .autofocus && this . focusField ()
192196 },
193197
194198 shouldFocus () {
You can’t perform that action at this time.
0 commit comments