diff --git a/source/Ox.UI/js/Form/Ox.Input.js b/source/Ox.UI/js/Form/Ox.Input.js index 918e5180..a439ea06 100644 --- a/source/Ox.UI/js/Form/Ox.Input.js +++ b/source/Ox.UI/js/Form/Ox.Input.js @@ -592,14 +592,19 @@ Ox.Input = function(options, self) { function clear() { // fixme: set to min, not zero // fixme: make this work for password - var value = ''; + self.options.value = ''; if (self.options.type == 'float') { - value = '0.0'; + self.options.value = '0.0'; } else if (self.options.type == 'int') { - value = '0' + self.options.value = '0' } - self.$input.val(value); - cursor(0, value.length); + self.$input.val(self.options.value); + cursor(0, self.options.value.length); + self.options.changeOnKeypress && that.triggerEvent({ + change: { + value: self.options.value + } + }); } function clickArrow(i) {