re-fixed enter key handling in lists, addresses #236

pull/334/head
Justin Richer 2013-04-29 16:57:26 -04:00
parent 39e06292fd
commit 6a20e7aaa9
1 changed files with 3 additions and 3 deletions

View File

@ -82,11 +82,11 @@ var ListWidgetView = Backbone.View.extend({
events:{
"click .btn-add":"addItem",
"keypress input":function (e) {
"keypress":function (e) {
// trap the enter key
if (e.which == 13) {
this.addItem();
e.preventDefault();
e.preventDefault();
this.addItem(e);
$("input", this.$el).focus();
}
}