Autocomplete: Prevent the default action on escape when the menu is open. Fixes #8282 - Double escape clear IE form, continue Ticket #7643.

This commit is contained in:
Scott González 2012-04-30 11:48:37 -04:00
parent 21df5c27e3
commit 4ab7d53b1c

View File

@ -119,6 +119,10 @@ $.widget( "ui.autocomplete", {
if ( self.menu.element.is(":visible") ) {
self._value( self.term );
self.close( event );
// Different browsers have different default behavior for escape
// Single press can mean undo or clear
// Double press in IE means clear the whole form
event.preventDefault();
}
break;
default: