Created
June 12, 2014 17:43
-
-
Save drewbrokke/98297123ba30d5ff8239 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
if (target.hasClass("form-builder-field-node")) { | |
if ((keyCode === 27) || | |
(keyCode === 13 && !target.hasClass("field-textarea")) || | |
(target.hasClass("field-textarea") && keyCode === 13 && event.ctrlKey === true)) { | |
target.ancestor(".form-builder-field").focus(); | |
} | |
// if ((keyCode === 13 && !target.hasClass("field-textarea"))) { | |
// target.ancestor(".form-builder-field").focus(); | |
// } | |
// if ((target.hasClass("field-textarea") && keyCode === 13 && event.ctrlKey === true)) { | |
// target.ancestor(".form-builder-field").focus(); | |
// } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nate tells me that
.hasClass
is not a cheap call.Mike and I did something like this in aui-datepicker:
https://github.com/marclundgren/alloy-ui/commit/93f796e001d9a37ba4687a4afbcc8a0b29d51a19