Skip to content

Instantly share code, notes, and snippets.

@kfranqueiro
Created February 22, 2013 21:02
Show Gist options
  • Save kfranqueiro/5016523 to your computer and use it in GitHub Desktop.
Save kfranqueiro/5016523 to your computer and use it in GitHub Desktop.
Example of a dojo/on extension event that fires when the enter key is released
function enterUp(node, listener) {
return on(node, "keyup", function(evt) {
if (evt.keyCode === 13) {
listener.call(this, evt);
}
});
}
// Usage with dojo/on: on(element, enterUp, ...)
// Usage with dgrid editor: editor({ editOn: enterUp, ... })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment