MDL-35680 user selector: more usable when queries are slow.
commit28c93484058f9397efa337e1f47c4c1daeea59a1
authorTim Hunt <T.J.Hunt@open.ac.uk>
Thu, 27 Sep 2012 18:03:34 +0000 (27 19:03 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Thu, 27 Sep 2012 18:10:41 +0000 (27 19:10 +0100)
tree08e84e43a4aa74bab28803e371afa4ebd037be6f
parent9273bd1abb534cbcc02cd5baf1482165fcbae2b5
MDL-35680 user selector: more usable when queries are slow.

The problem is to do when you pause a bit, so a search starts, and then
type a bit more before the search finishes. It was behaving like this:

1. Type a bit, then pause.
2. First search request sent.
3. Type a bit more, then pause.
4. Second search request sent.
5. First search request completes.
6. You try to select one result.
7. Second search request comples, overwriting what you are selecting.

This fix works by cancelling the first request before sending the
second.
user/selector/module.js