mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-04-20 03:02:41 -04:00
Autocomplete: Whitespace.
This commit is contained in:
@@ -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"]);
|
||||
|
||||
14
ui/jquery.ui.autocomplete.js
vendored
14
ui/jquery.ui.autocomplete.js
vendored
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user