potential fix for #1787

This commit is contained in:
r888888888 2013-06-21 13:08:36 -07:00
parent 435b4ae2dd
commit 254a08a011
2 changed files with 13 additions and 4 deletions

View File

@ -132,7 +132,7 @@ $.widget( "ui.autocomplete", {
if ( this.menu.active ) { if ( this.menu.active ) {
this.menu.select( event ); this.menu.select( event );
} }
n.preventDefault(); event.preventDefault();
break; break;
case keyCode.ESCAPE: case keyCode.ESCAPE:
if ( this.menu.element.is( ":visible" ) ) { if ( this.menu.element.is( ":visible" ) ) {
@ -154,7 +154,7 @@ $.widget( "ui.autocomplete", {
keypress: function( event ) { keypress: function( event ) {
if ( suppressKeyPress ) { if ( suppressKeyPress ) {
suppressKeyPress = false; suppressKeyPress = false;
event.preventDefault(); // event.preventDefault();
return; return;
} }
if ( suppressKeyPressRepeat ) { if ( suppressKeyPressRepeat ) {

View File

@ -1,5 +1,5 @@
--- jquery-ui-autocomplete-1.10.2.js 2013-06-21 11:19:32.000000000 -0700 --- jquery-ui-autocomplete-1.10.2.js 2013-06-21 11:19:32.000000000 -0700
+++ jquery-ui-autocomplete-custom.js 2013-06-21 11:48:21.000000000 -0700 +++ jquery-ui-autocomplete-custom.js 2013-06-21 13:07:23.000000000 -0700
@@ -76,6 +76,16 @@ @@ -76,6 +76,16 @@
.attr( "autocomplete", "off" ); .attr( "autocomplete", "off" );
@ -29,7 +29,16 @@
if ( this.menu.active ) { if ( this.menu.active ) {
this.menu.select( event ); this.menu.select( event );
} }
+ n.preventDefault(); + event.preventDefault();
break; break;
case keyCode.ESCAPE: case keyCode.ESCAPE:
if ( this.menu.element.is( ":visible" ) ) { if ( this.menu.element.is( ":visible" ) ) {
@@ -142,7 +154,7 @@
keypress: function( event ) {
if ( suppressKeyPress ) {
suppressKeyPress = false;
- event.preventDefault();
+ // event.preventDefault();
return;
}
if ( suppressKeyPressRepeat ) {