From adb452f8554e0b97e6e9c98c5bea86b1de144b71 Mon Sep 17 00:00:00 2001 From: Rolux Date: Thu, 18 Feb 2010 20:49:36 +0530 Subject: [PATCH] autocomplete, continued --- build/js/ox.ui.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index 93668a9..18656ef 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -1574,9 +1574,8 @@ requires }); } function autocomplete(items) { - var selected; + var selected = 0; if (items.length) { - selected = items.length == 1 ? 0 : -1; items = $.map(items, function(title, position) { if (that.val().toLowerCase() == title.toLowerCase()) { selected = position; @@ -1625,7 +1624,7 @@ requires self.value = value; self.options.autocomplete(self.value, autocomplete); } - }, 50); + }, 25); } } function onClick(event, data) {