Skip to content

Commit b8333ed

Browse files
committed
update fix for #6055 (keyDown event doesn't prevent form from submit). Move suppressKeyPress declaration to the upper scope
1 parent 19f535f commit b8333ed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ui/jquery.ui.autocomplete.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ $.widget( "ui.autocomplete", {
2828
},
2929
_create: function() {
3030
var self = this,
31-
doc = this.element[ 0 ].ownerDocument;
31+
doc = this.element[ 0 ].ownerDocument,
32+
suppressKeyPress = false;
3233
this.element
3334
.addClass( "ui-autocomplete-input" )
3435
.attr( "autocomplete", "off" )
@@ -43,7 +44,7 @@ $.widget( "ui.autocomplete", {
4344
return;
4445
}
4546

46-
var suppressKeyPress = false;
47+
suppressKeyPress = false;
4748
var keyCode = $.ui.keyCode;
4849
switch( event.keyCode ) {
4950
case keyCode.PAGE_UP:

0 commit comments

Comments
 (0)