Autocomplete: Whitespace.

This commit is contained in:
Scott González
2011-05-27 08:35:18 -04:00
parent be7da0239a
commit 8a972f5cce
2 changed files with 9 additions and 7 deletions

View File

@@ -1,4 +1,6 @@
<?php
sleep( 3 );
// no term passed - just exit early with no response
if (empty($_GET['term'])) exit ;
$q = strtolower($_GET["term"]);

View File

@@ -63,7 +63,7 @@ $.widget( "ui.autocomplete", {
})
.bind( "keydown.autocomplete", function( event ) {
if ( self.options.disabled || self.element.attr( "readonly" ) ) {
suppressKeyPress = true;
suppressKeyPress = true;
suppressInput = true;
return;
}
@@ -73,21 +73,21 @@ $.widget( "ui.autocomplete", {
var keyCode = $.ui.keyCode;
switch( event.keyCode ) {
case keyCode.PAGE_UP:
suppressKeyPress = true;
suppressKeyPress = true;
self._move( "previousPage", event );
break;
case keyCode.PAGE_DOWN:
suppressKeyPress = true;
suppressKeyPress = true;
self._move( "nextPage", event );
break;
case keyCode.UP:
suppressKeyPress = true;
suppressKeyPress = true;
self._move( "previous", event );
// prevent moving cursor to beginning of text field in some browsers
event.preventDefault();
break;
case keyCode.DOWN:
suppressKeyPress = true;
suppressKeyPress = true;
self._move( "next", event );
// prevent moving cursor to end of text field in some browsers
event.preventDefault();
@@ -122,7 +122,7 @@ $.widget( "ui.autocomplete", {
if ( suppressKeyPress ) {
suppressKeyPress = false;
event.preventDefault();
return;
return;
}
// replicate some key handlers to allow them to repeat in Firefox and Opera
@@ -144,7 +144,7 @@ $.widget( "ui.autocomplete", {
// prevent moving cursor to end of text field in some browsers
event.preventDefault();
break;
}
}
})
.bind( "input.autocomplete", function(event) {
if ( suppressInput ) {