Created
June 12, 2014 16:23
-
-
Save drewbrokke/d169b39824705301b55f to your computer and use it in GitHub Desktop.
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
_handleKeypressEvent: function(event) { | |
var instance = this; | |
var target = event.target; | |
else if (target.hasClass("form-builder-field")) { | |
var keyCode = event.keyCode; | |
var field = target; | |
if (keyCode === 40) { // Down Arrow | |
next = A.Widget.getByNode(field.next()); | |
if (next !== null) { | |
instance.simulateFocusField(next); | |
} | |
} | |
else if (keyCode === 38) { // Up Arrow | |
previous = A.Widget.getByNode(field.previous()); | |
if (previous !== null) { | |
instance.simulateFocusField(previous); | |
} | |
} | |
else if (keyCode === 13) { // Enter Key | |
} | |
} | |
event.stopPropagation(); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment