From c19e7b3496d14b40e71ba892213889fc8cc81d4f Mon Sep 17 00:00:00 2001 From: TJ VanToll Date: Wed, 22 May 2013 21:43:40 -0400 Subject: [PATCH] Dialog: Add type="button" to the close button. Fixed #9312: Dialog: closes on enter in textbox in IE. --- ui/jquery.ui.dialog.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index b01907acf..16095292c 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -342,7 +342,10 @@ $.widget( "ui.dialog", { } }); - this.uiDialogTitlebarClose = $("") + // support: IE + // Use type="button" to prevent enter keypresses in textboxes from closing the + // dialog in IE (#9312) + this.uiDialogTitlebarClose = $( "" ) .button({ label: this.options.closeText, icons: { -- 2.39.5