jquery event: closes #3843. Some events' timeStamp are wrong on Firefox, we don't rely on the native value anymore. timeStamp reflects object creation, not last event triggered.

This commit is contained in:
Ariel Flesler 2009-01-19 22:20:25 +00:00
parent 82e8d11c12
commit 735d44f6df

View File

@ -377,13 +377,13 @@ jQuery.Event = function( src ){
if( src && src.type ){
this.originalEvent = src;
this.type = src.type;
this.timeStamp = src.timeStamp;
// Event type
}else
this.type = src;
if( !this.timeStamp )
this.timeStamp = now();
// timeStamp is buggy for some events on Firefox(#3843)
// So we won't rely on the native value
this.timeStamp = now();
// Mark it as fixed
this[expando] = true;