I just noticed you simulate a 'keypress' event, which doesn't actually mean a 'keyup' event will be triggered when running the fireunit.key helper.
It would be nice if you could add a 'keyup' event helper.
I'm no javascript ninja, but this worked for me:
// Extend fireunit to make it simulate a keyUp event
fireunit.keyup = function ( node ){
node = this.id( node );
var doc = node.ownerDocument, event = doc.createEvent("KeyEvents");
event.initKeyEvent("keyup", true, true, doc.defaultView, false, false, false,
false, false, false);
return node.dispatchEvent( event );
}
I just noticed you simulate a 'keypress' event, which doesn't actually mean a 'keyup' event will be triggered when running the fireunit.key helper.
It would be nice if you could add a 'keyup' event helper.
I'm no javascript ninja, but this worked for me: