This repository was archived by the owner on Mar 22, 2019. It is now read-only.
fixing getting-started bug when editing todo #1367
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Editing todos throws an error whenever the change is confirmed by using a newline (Enter). In particular, it throws the error
Uncaught Error: Attempted to handle event 'willCommit' on <Todos.Todo:ember270:2> while in state root.loaded.updated.inFlight.For the final Todo (Replacing the Fixture Adapter with Another Adapter), it throws the error
Uncaught Error: Attempted to handle event 'willCommit' on <Todos.Todo:ember272:oumdk> while in state root.deleted.saved.when you attempt to delete a todo by editing the item to be blank. This error throws future errors in some cases such as
Assertion failed: calling set on destroyed object, making the todo list unable to function. Note that this bug does not occur when one confirms an edit by clicking somewhere out of the textfield.This bug occurs because when newline triggers an edit or removal of a todo,
acceptChangesis called a second time due to the textfield being focused out. This may or may not be intended behavior -- PR fixes this and all JSBins by checking whether it is still in edit mode.