Fix regressed autocomplete changes
also update the patch file
This commit is contained in:
@@ -107,19 +107,9 @@ $.widget( "ui.autocomplete", {
|
|||||||
suppressKeyPress = true;
|
suppressKeyPress = true;
|
||||||
this._keyEvent( "next", event );
|
this._keyEvent( "next", event );
|
||||||
break;
|
break;
|
||||||
case keyCode.SPACE:
|
|
||||||
case keyCode.ENTER:
|
|
||||||
// when menu is open and has focus
|
|
||||||
if ( this.menu.active ) {
|
|
||||||
// #6055 - Opera still allows the keypress to occur
|
|
||||||
// which causes forms to submit
|
|
||||||
suppressKeyPress = true;
|
|
||||||
event.preventDefault();
|
|
||||||
this.menu.select( event );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case keyCode.TAB:
|
case keyCode.TAB:
|
||||||
if ( this.menu.active ) {
|
if ( this.menu.active ) {
|
||||||
|
event.preventDefault();
|
||||||
this.menu.select( event );
|
this.menu.select( event );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
--- jquery-ui-autocomplete-1.11.2.js 2014-10-16 15:17:29.000000000 -0700
|
--- jquery-ui-autocomplete-1.11.2.js Fri Oct 17 12:17:55 2014
|
||||||
+++ jquery-ui-autocomplete-custom.js 2014-10-16 15:16:59.000000000 -0700
|
+++ jquery-ui-autocomplete-custom.js Fri Oct 17 12:27:14 2014
|
||||||
@@ -68,6 +68,16 @@
|
@@ -68,6 +68,16 @@
|
||||||
.attr( "autocomplete", "off" );
|
.attr( "autocomplete", "off" );
|
||||||
|
|
||||||
@@ -17,11 +17,23 @@
|
|||||||
keydown: function( event ) {
|
keydown: function( event ) {
|
||||||
if ( this.element.prop( "readOnly" ) ) {
|
if ( this.element.prop( "readOnly" ) ) {
|
||||||
suppressKeyPress = true;
|
suppressKeyPress = true;
|
||||||
@@ -97,6 +107,7 @@
|
@@ -97,18 +107,9 @@
|
||||||
suppressKeyPress = true;
|
suppressKeyPress = true;
|
||||||
this._keyEvent( "next", event );
|
this._keyEvent( "next", event );
|
||||||
break;
|
break;
|
||||||
+ case keyCode.SPACE:
|
- case keyCode.ENTER:
|
||||||
case keyCode.ENTER:
|
- // when menu is open and has focus
|
||||||
// when menu is open and has focus
|
- if ( this.menu.active ) {
|
||||||
|
- // #6055 - Opera still allows the keypress to occur
|
||||||
|
- // which causes forms to submit
|
||||||
|
- suppressKeyPress = true;
|
||||||
|
- event.preventDefault();
|
||||||
|
- this.menu.select( event );
|
||||||
|
- }
|
||||||
|
- break;
|
||||||
|
case keyCode.TAB:
|
||||||
if ( this.menu.active ) {
|
if ( this.menu.active ) {
|
||||||
|
+ event.preventDefault();
|
||||||
|
this.menu.select( event );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user