Commit 8f9ee834 authored by Aaron Boushley's avatar Aaron Boushley

Implement removal of items when blanked on edit.

parent 7405c80f
......@@ -129,7 +129,12 @@ $(function(){
// Close the `"editing"` mode, saving changes to the todo.
close: function() {
this.model.save({title: this.input.val()});
var value = this.input.val().trim();
if (!value)
this.clear();
this.model.save({title: value});
$(this.el).removeClass("editing");
},
......
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