Dialog: Add type="button" to the close button. Fixed #9312: Dialog: closes on enter in textbox in IE.

This commit is contained in:
TJ VanToll 2013-05-22 21:43:40 -04:00
parent daf3f0d9af
commit c19e7b3496

View File

@ -342,7 +342,10 @@ $.widget( "ui.dialog", {
} }
}); });
this.uiDialogTitlebarClose = $("<button></button>") // support: IE
// Use type="button" to prevent enter keypresses in textboxes from closing the
// dialog in IE (#9312)
this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
.button({ .button({
label: this.options.closeText, label: this.options.closeText,
icons: { icons: {