diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-04-30 11:48:37 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-04-30 11:48:37 -0400 |
commit | 4ab7d53b1cfb4e37e3c098ceddc33597b851a88f (patch) | |
tree | 2d2f728cf0f7e3258913a4b33f4fb61d63b39ee1 /ui/jquery.ui.autocomplete.js | |
parent | 21df5c27e312c6e5fda66e602abefa51c484d676 (diff) | |
download | jquery-ui-4ab7d53b1cfb4e37e3c098ceddc33597b851a88f.tar.gz jquery-ui-4ab7d53b1cfb4e37e3c098ceddc33597b851a88f.zip |
Autocomplete: Prevent the default action on escape when the menu is open. Fixes #8282 - Double escape clear IE form, continue Ticket #7643.
Diffstat (limited to 'ui/jquery.ui.autocomplete.js')
-rw-r--r-- | ui/jquery.ui.autocomplete.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index ab4d17584..123ff687e 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/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: |