change Ox.Input so it doesn't fire blur on submit
This commit is contained in:
parent
1cf7566eeb
commit
76c97f7bdc
1 changed files with 5 additions and 2 deletions
|
@ -597,7 +597,7 @@ Ox.Input = function(options, self) {
|
||||||
}
|
}
|
||||||
// fixme: for some reason, if options.type is set, no change event fires
|
// fixme: for some reason, if options.type is set, no change event fires
|
||||||
// as a workaround, blur sends a value. remove later...
|
// as a workaround, blur sends a value. remove later...
|
||||||
!self.cancelled && that.triggerEvent('blur', {
|
!self.cancelled && !self.submitted && that.triggerEvent('blur', {
|
||||||
value: self.options.value
|
value: self.options.value
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -796,7 +796,10 @@ Ox.Input = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function submit() {
|
function submit() {
|
||||||
|
self.submitted = true;
|
||||||
self.$input.blur();
|
self.$input.blur();
|
||||||
|
self.submitted = false;
|
||||||
|
//self.options.type == 'textarea' && self.$input.blur();
|
||||||
that.triggerEvent('submit', {
|
that.triggerEvent('submit', {
|
||||||
value: self.options.value
|
value: self.options.value
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue