We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7a85a2 commit c46d471Copy full SHA for c46d471
src/components/form/form.vue
@@ -144,6 +144,10 @@
144
this.$emit(EVENT_VALID, this.validity)
145
this.$emit(EVENT_SUBMIT, e, this.model, this.fieldsModel)
146
} else {
147
+ // scrollToInvalidField
148
+ if (this.options.scrollToInvalidField && this.firstInvalidField) {
149
+ this.firstInvalidField.$el.scrollIntoView()
150
+ }
151
e.preventDefault()
152
this.$emit(EVENT_INVALID, this.validity)
153
}
@@ -164,11 +168,6 @@
164
168
},
165
169
_submit(cb) {
166
170
this.validate(() => {
167
- if (this.invalid) {
- if (this.options.scrollToInvalidField && this.firstInvalidField) {
- this.firstInvalidField.$el.scrollIntoView()
- }
171
172
cb && cb(this.valid)
173
})
174
0 commit comments