Created
February 22, 2013 21:02
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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