change Ox.Input so it doesn't fire blur on submit

This commit is contained in:
rlx 2011-11-06 11:37:07 +00:00
parent 1cf7566eeb
commit 76c97f7bdc

View file

@ -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
}); });