Query relative to the view element.

This commit is contained in:
JC Brand 2017-03-30 14:39:44 +02:00
parent 9a2c7257d7
commit 0d256dbaf8

View File

@ -433,7 +433,7 @@
* (Event) ev - the submit event.
*/
if (ev && ev.preventDefault) { ev.preventDefault(); }
var has_empty_inputs = _.reduce(document.querySelectorAll('input.required'),
var has_empty_inputs = _.reduce(this.el.querySelectorAll('input.required'),
function (result, input) {
if (input.value === '') {
input.classList.add('error');