fix ui.save not detect escape key
change event from onkeypress to onkeyup because onkeypress cannot detect escape key press if (e.keyCode === 27)
This commit is contained in:
parent
f6e627a891
commit
450570d4c9
1 changed files with 1 additions and 1 deletions
|
|
@ -104,7 +104,7 @@ var Todos = {
|
|||
m("label", {ondblclick: function() {state.dispatch("edit", [todo])}}, todo.title),
|
||||
m("button.destroy", {onclick: function() {state.dispatch("destroy", [todo])}}),
|
||||
]),
|
||||
m("input.edit", {onupdate: function(vnode) {ui.focus(vnode, todo)}, onkeypress: ui.save, onblur: ui.save})
|
||||
m("input.edit", {onupdate: function(vnode) {ui.focus(vnode, todo)}, onkeyup: ui.save, onblur: ui.save})
|
||||
])
|
||||
}),
|
||||
]),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue