]> source.dussan.org Git - jquery.git/commitdiff
Make sure that Internet Explorer 6-8 won't give a "failed" error, when a request... 434/head
authorSteen Nielsen <swinedk@gmail.com>
Fri, 15 Jul 2011 20:21:44 +0000 (22:21 +0200)
committerSteen Nielsen <swinedk@gmail.com>
Fri, 15 Jul 2011 20:21:44 +0000 (22:21 +0200)
src/event.js

index 131739b1afac3410d585fe2fcb33f06cff4157bf..9ff6fae831f2523dcc4a10c91fff8dd379200f01 100644 (file)
@@ -703,7 +703,7 @@ if ( !jQuery.support.submitBubbles ) {
                        if ( !jQuery.nodeName( this, "form" ) ) {
                                jQuery.event.add(this, "click.specialSubmit", function( e ) {
                                        var elem = e.target,
-                                               type = elem.type;
+                                               type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
 
                                        if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
                                                trigger( "submit", this, arguments );
@@ -712,7 +712,7 @@ if ( !jQuery.support.submitBubbles ) {
 
                                jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
                                        var elem = e.target,
-                                               type = elem.type;
+                                               type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
 
                                        if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
                                                trigger( "submit", this, arguments );
@@ -737,7 +737,8 @@ if ( !jQuery.support.changeBubbles ) {
        var changeFilters,
 
        getVal = function( elem ) {
-               var type = elem.type, val = elem.value;
+               var type = jQuery.nodeName( elem, "input" ) ? elem.type : "",
+                       val = elem.value;
 
                if ( type === "radio" || type === "checkbox" ) {
                        val = elem.checked;