re-fixed enter key handling in lists, addresses #236
parent
39e06292fd
commit
6a20e7aaa9
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue