aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.autocomplete.js
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2011-06-02 14:06:54 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2011-06-02 14:06:54 +0200
commitafe0f72945170879571ebaf060a816b39c9871b8 (patch)
tree8892e33dc624fe920c9d2838cac0d82b34e04882 /ui/jquery.ui.autocomplete.js
parentcfaddbfb2a49fbd7f511d49f6404c7447469c5b0 (diff)
parent27a4fdd8ed4fe7733ea139022c04bd7ef8033cba (diff)
downloadjquery-ui-afe0f72945170879571ebaf060a816b39c9871b8.tar.gz
jquery-ui-afe0f72945170879571ebaf060a816b39c9871b8.zip
Merge branch 'master' into widget-factory-demo
Diffstat (limited to 'ui/jquery.ui.autocomplete.js')
-rw-r--r--ui/jquery.ui.autocomplete.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js
index f6573174a..e39b4649e 100644
--- a/ui/jquery.ui.autocomplete.js
+++ b/ui/jquery.ui.autocomplete.js
@@ -19,6 +19,7 @@
var requestIndex = 0;
$.widget( "ui.autocomplete", {
+ version: "@VERSION",
defaultElement: "<input>",
options: {
appendTo: "body",
@@ -63,7 +64,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 +74,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 +123,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 +145,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 ) {
@@ -475,7 +476,6 @@ $.widget( "ui.autocomplete", {
});
$.extend( $.ui.autocomplete, {
- version: "@VERSION",
escapeRegex: function( value ) {
return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
},