r3392 committed - autocomplete: handle page up/down same as cursor up/down when first or...
Revision: 3392
Author: joern.zaefferer
Date: Sun Oct 25 05:08:10 2009
Log: autocomplete: handle page up/down same as cursor up/down when first or
last item is selected
http://code.google.com/p/jquery-ui/source/detail?r=3392
Modified:
/branches/dev/ui/jquery.ui.autocomplete.js
=======================================
--- /branches/dev/ui/jquery.ui.autocomplete.js Sun Oct 25 03:28:01 2009
+++ /branches/dev/ui/jquery.ui.autocomplete.js Sun Oct 25 05:08:10 2009
@@ -184,7 +184,7 @@
this.search();
return;
}
- if (this.menu.first() && direction == "previous" || this.menu.last() &&
direction == "next") {
+ if (this.menu.first() && /^previous/.test(direction) || this.menu.last()
&& /^next/.test(direction)) {
this.element.val(this.term);
this.menu.deactivate();
return;