bramstein/knockout.selection — pull request #31 by mwoc (2013-04-08 21:33:55+00:00)
Title: Changing space select to only toggle selection of focused item, but not touching other items

Currently, pressing Space will toggle selection of the anchored item, but also deselect any other items.
It might make more sense to maintain the selection status of items other than the anchored, so that one can also toggle selection status without using the mouse (currently only possible with Ctrl+click as far as I'm aware).

The only client I could find with support for space bar selection toggling is FileZilla, which behaves as proposed here.

This pull request introduces:
-Two new tests for space behaviour in multi-select mode, with selected items
-Rewrote two tests introduced in commit https://github.com/mwoc/knockout.selection/commit/cf18b090224940b230d4bf06398e55faa070bc15 - so they do not use space anymore for checking where the anchor is
-A change to the toggleSelection function, making it also pass the two new tests