codeparty/racer — pull request #152 by cjblomqvist (2013-08-23 12:37:18+00:00)
Title: Filter event order fixes

Fixing issues with event ordering which is highlighted in any of the following scenarios:

Assume a filter is rendered through and #each loop, where one of the attribute of every item is linked to an input.

1. The first row is removed while the user has focus on the input. This will trigger a blur event which will happen after the items in the filter has been adjusted, which will make it trigger on the subsequent row (basically copying the value of the removed row to the one below).

2. The filter is also sorted, and a change to one attribute changes the sort order. Derby will trigger a remove and an insert of the item in question. However, when the insert happens, it will have already reshuffled things in the underlying filter (because the filter is updated prematurely) thus causing the item that is resorted to get the data of another item.

There's one thing to note here. This only happens in the browser using the browser-shim of the EventEmitter. Thus, the original fix causes problems server-side. This is however fixed in the last commit. However, it means it's not possible to test it according to how tests are done at the moment (easily anyhow).