Skip to content

Commit 8a972f5

Browse files
committed
Autocomplete: Whitespace.
1 parent be7da02 commit 8a972f5

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

demos/autocomplete/search.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<?php
2+
3+
sleep( 3 );
24
// no term passed - just exit early with no response
35
if (empty($_GET['term'])) exit ;
46
$q = strtolower($_GET["term"]);

ui/jquery.ui.autocomplete.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ $.widget( "ui.autocomplete", {
6363
})
6464
.bind( "keydown.autocomplete", function( event ) {
6565
if ( self.options.disabled || self.element.attr( "readonly" ) ) {
66-
suppressKeyPress = true;
66+
suppressKeyPress = true;
6767
suppressInput = true;
6868
return;
6969
}
@@ -73,21 +73,21 @@ $.widget( "ui.autocomplete", {
7373
var keyCode = $.ui.keyCode;
7474
switch( event.keyCode ) {
7575
case keyCode.PAGE_UP:
76-
suppressKeyPress = true;
76+
suppressKeyPress = true;
7777
self._move( "previousPage", event );
7878
break;
7979
case keyCode.PAGE_DOWN:
80-
suppressKeyPress = true;
80+
suppressKeyPress = true;
8181
self._move( "nextPage", event );
8282
break;
8383
case keyCode.UP:
84-
suppressKeyPress = true;
84+
suppressKeyPress = true;
8585
self._move( "previous", event );
8686
// prevent moving cursor to beginning of text field in some browsers
8787
event.preventDefault();
8888
break;
8989
case keyCode.DOWN:
90-
suppressKeyPress = true;
90+
suppressKeyPress = true;
9191
self._move( "next", event );
9292
// prevent moving cursor to end of text field in some browsers
9393
event.preventDefault();
@@ -122,7 +122,7 @@ $.widget( "ui.autocomplete", {
122122
if ( suppressKeyPress ) {
123123
suppressKeyPress = false;
124124
event.preventDefault();
125-
return;
125+
return;
126126
}
127127

128128
// replicate some key handlers to allow them to repeat in Firefox and Opera
@@ -144,7 +144,7 @@ $.widget( "ui.autocomplete", {
144144
// prevent moving cursor to end of text field in some browsers
145145
event.preventDefault();
146146
break;
147-
}
147+
}
148148
})
149149
.bind( "input.autocomplete", function(event) {
150150
if ( suppressInput ) {

0 commit comments

Comments
 (0)