]> source.dussan.org Git - jquery-ui.git/commitdiff
Dialog: Add type="button" to the close button. Fixed #9312: Dialog: closes on enter...
authorTJ VanToll <tj.vantoll@gmail.com>
Thu, 23 May 2013 01:43:40 +0000 (21:43 -0400)
committerTJ VanToll <tj.vantoll@gmail.com>
Thu, 23 May 2013 23:57:32 +0000 (19:57 -0400)
ui/jquery.ui.dialog.js

index b01907acff94c7179090c694c21bfa9b81edb16a..16095292cf101bebcfe32ac3e3c301843938180c 100644 (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({
                                label: this.options.closeText,
                                icons: {