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
// 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
});
}
@ -796,7 +796,10 @@ Ox.Input = function(options, self) {
}
function submit() {
self.submitted = true;
self.$input.blur();
self.submitted = false;
//self.options.type == 'textarea' && self.$input.blur();
that.triggerEvent('submit', {
value: self.options.value
});
@ -1864,7 +1867,7 @@ Ox.Range_ = function(options, self) {
value: val
});
setThumb(animate);
that.triggerEvent('change', { value: val });
that.triggerEvent('change', {value: val});
}
}
function setWidth(width) {