I didn't look at your code, but was able to duplicate the issue you
mentioned about todomvc.
Steps to reproduce:
1. Create a todo
2. Double click to edit
3. Make a change to the todo body
4. Hit the escape key
5. The one todo item will now have multiple bodies displayed
These two else clauses in the editing block are causing this behavior:
else if [#blur element: [#todo-editor todo value]]
then (todo, value, false, todo.completed)
else if [#keydown element: [#todo-editor todo] key: "escape"]
then (todo, todo.body, false, todo.completed)
The escape key is hit and the 2nd clause is triggered and the todo
gets committed with body = todo.body. But then the blur event will
also trigger and this time the todo gets committed with body = value.
I'm not sure what the correct fix is. The blur event can happen in 3
different cases: 1) after enter key is hit 2) after escape key is hit
3) after clicking outside the edit box
For #2 and #3 the edit should be cancelled and for #1 it should be accepted.
Maybe the fix is to update the [#todo-editor value] attribute to match
what was committed into the todo record.
> --
> You received this message because you are subscribed to the Google Groups
> "Eve talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
eve-talk+u...@googlegroups.com.
> To post to this group, send email to
eve-...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/eve-talk/c35b7968-7f97-4b16-a33d-c6bb160e3920%40googlegroups.com.
>
> For more options, visit
https://groups.google.com/d/optout.