Oct 28, 2010, 10:18 PM
Only one of the events is firing on Textfield - keyup or keydown but not both.
Hi
When we attach the below as a plugin to Textfield, only the keydown eventhandler is executing, could someone please help with what is the issue here. My requirement is to be able to handle both the keydown and keyup events so that I could see both the old/new values and process accordingly.
When we attach the below as a plugin to Textfield, only the keydown eventhandler is executing, could someone please help with what is the issue here. My requirement is to be able to handle both the keydown and keyup events so that I could see both the old/new values and process accordingly.
Ext.ux.Mask = function(mask) {
var config = {
mask: mask
};
Ext.apply(this, config);
};
Ext.extend(Ext.ux.Mask, Object, {
init: function(c) {
c.enableKeyEvents = true;
c.on('keydown', function(field, evt) { alert(field.getValue()); }, this);
c.on('keyup', function(field, evt) { alert(field.getValue()); }, this);
}
});
Last edited by geoffrey.mcgill; Oct 28, 2010 at 10:45 PM.
Reason: please use [CODE] tags