]> 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)
committerScott González <scott.gonzalez@gmail.com>
Tue, 26 Nov 2013 15:25:23 +0000 (10:25 -0500)
(cherry picked from commit c19e7b3496d14b40e71ba892213889fc8cc81d4f)

ui/jquery.ui.dialog.js

index 38180d2c15e948d34014dd9f34364875ee9e3e53..22bbfbc6d859141ddb65c1e8f306d9d2c830e315 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: {