I have a input checkbox inside a table cell. When I debug and click on the checkbox it seems to be checked. But when I come to this code in jquery-1.8.3.js:
CODE START
if ( ret !== undefined ) {
event.result = ret;
if ( ret === false ) {
event.preventDefault();
event.stopPropagation();
}
}
ret is undefined.
AND THEN JUMP TO THIS
// Run delegates first; they may want to stop propagation beneath us
for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
matched = handlerQueue[ i ];
event.currentTarget = matched.elem;
for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
handleObj = matched.matches[ j ];
AND THEN JUMP TO THIS
// Call the postDispatch hook for the mapped type
if ( special.postDispatch ) {
special.postDispatch.call( this, event );
}
return event.result;
CODE END
event.result is undefined so it jump to this last code that unchecked the checkbox.
LAST CODE
eventHandle = elemData.handle;
if ( !eventHandle ) {
elemData.handle = eventHandle = function( e ) {
// Discard the second event of a jQuery.event.trigger() and
// when an event is called after a page has unloaded
return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
undefined;
};
CODE END
Probably hasn't nothing to do with the jquery code, but that is where the last track of this problem ends. Anyone knows what the problem is? If I upload the page will the checkbox become checked.
Aucun commentaire:
Enregistrer un commentaire