From 4ab7d53b1cfb4e37e3c098ceddc33597b851a88f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 30 Apr 2012 11:48:37 -0400 Subject: [PATCH] Autocomplete: Prevent the default action on escape when the menu is open. Fixes #8282 - Double escape clear IE form, continue Ticket #7643. --- ui/jquery.ui.autocomplete.js | 4 ++++ 1 file changed, 4 insertions(+) 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: -- 2.39.5