Commit 9eebbccf authored by Sindre Sorhus's avatar Sindre Sorhus

Forgot to update Knockback src files

Followup to 2b995142
parent 301a0541
......@@ -7,7 +7,7 @@ $ ->
ko.bindingHandlers.selectAndFocus =
init: (element, value_accessor, all_bindings_accessor) ->
ko.bindingHandlers.hasfocus.init(element, value_accessor, all_bindings_accessor)
ko.utils.registerEventHandler(element, 'focus', -> element.select())
ko.utils.registerEventHandler(element, 'focus', -> element.focus())
update: (element, value_accessor) ->
ko.utils.unwrapObservable(value_accessor()) # create dependency
_.defer(=>ko.bindingHandlers.hasfocus.update(element, value_accessor))
......
......@@ -19,7 +19,7 @@ TodoViewModel = (model) ->
@onDestroyTodo = => model.destroy()
@onCheckEditBegin = => (@editing(true); $('.todo-input').focus()) if not @editing() and not @completed()
@onCheckEditBegin = => @editing(true) if not @editing() and not @completed()
@onCheckEditEnd = (view_model, event) => ($('.todo-input').blur(); @editing(false)) if (event.keyCode == 13) or (event.type == 'blur')
@
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment