X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fevent.js;h=a4b8f6cdb9781bd1145c790cac1b59d8f2b6c8a5;hb=3e286440d55749382a644ea97b4f0b2587779d65;hp=0128dc5999ddefe5aa68d46a05ef8f0f453050a6;hpb=01f72026ec939e87da85a7afc1a5262872ea3ce5;p=jquery.git diff --git a/src/event.js b/src/event.js index 0128dc5..a4b8f6c 100644 --- a/src/event.js +++ b/src/event.js @@ -661,14 +661,14 @@ function testChange( e ) { data = jQuery.data( elem, "_change_data" ); val = getVal(elem); - if ( val === data ) { - return; - } - // the current data will be also retrieved by beforeactivate if ( e.type !== "focusout" || elem.type !== "radio" ) { jQuery.data( elem, "_change_data", val ); } + + if ( data === undefined || val === data ) { + return; + } if ( data != null || val ) { e.type = "change"; @@ -850,9 +850,9 @@ jQuery.each(["live", "die"], function( i, name ) { data = undefined; } - types = types.split( /\s+/ ); + types = (types || "").split( /\s+/ ); - while ( (type = types[ i++ ]) ) { + while ( (type = types[ i++ ]) != null ) { type = type === "focus" ? "focusin" : // focus --> focusin type === "blur" ? "focusout" : // blur --> focusout type === "hover" ? types.push("mouseleave") && "mouseenter" : // hover support @@ -934,7 +934,7 @@ function liveHandler( event ) { } function liveConvert( type, selector ) { - return ["live", type, selector.replace(/\./g, "`").replace(/ /g, "&")].join("."); + return "live." + (type ? type + "." : "") + selector.replace(/\./g, "`").replace(/ /g, "&"); } jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +