bramstein/knockout.selection — pull request #50 by mwoc (2013-06-27 09:36:31+00:00)
Title: Don't null focused unless absolutely necessary

Currently, the focused gets nulled when the focused element is removed from the data set. This however prevents any keydown events from being triggered, as the keydown event handler depends on focused being set.
I've checked what other selection models do - in Win7 explorer for example, the "item at the same index as the removed item" is focused instead (or the last item in the array). This is quite nice behaviour.

The anchor is currently still nulled out if it's removed, which the Win7 explorer also does, though if you prefer that one to be maintained in a similar way that should be possible too.