Skip to content
Permalink
Browse files

Autocomplete: Prevent the default action on escape when the menu is o…

…pen. Fixes #8282 - Double escape clear IE form, continue Ticket #7643.
  • Loading branch information...
scottgonzalez committed Apr 30, 2012
1 parent 21df5c2 commit 4ab7d53b1cfb4e37e3c098ceddc33597b851a88f
Showing with 4 additions and 0 deletions.
  1. +4 −0 ui/jquery.ui.autocomplete.js
@@ -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:

0 comments on commit 4ab7d53

Please sign in to comment.
You can’t perform that action at this time.