Skip to content

Commit c19e7b3

Browse files
committed
Dialog: Add type="button" to the close button. Fixed #9312: Dialog: closes on enter in textbox in IE.
1 parent daf3f0d commit c19e7b3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ui/jquery.ui.dialog.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,10 @@ $.widget( "ui.dialog", {
342342
}
343343
});
344344

345-
this.uiDialogTitlebarClose = $("<button></button>")
345+
// support: IE
346+
// Use type="button" to prevent enter keypresses in textboxes from closing the
347+
// dialog in IE (#9312)
348+
this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
346349
.button({
347350
label: this.options.closeText,
348351
icons: {

0 commit comments

Comments
 (0)