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:
parent
82e8d11c12
commit
735d44f6df
|
@ -377,13 +377,13 @@ jQuery.Event = function( src ){
|
||||||
if( src && src.type ){
|
if( src && src.type ){
|
||||||
this.originalEvent = src;
|
this.originalEvent = src;
|
||||||
this.type = src.type;
|
this.type = src.type;
|
||||||
this.timeStamp = src.timeStamp;
|
|
||||||
// Event type
|
// Event type
|
||||||
}else
|
}else
|
||||||
this.type = src;
|
this.type = src;
|
||||||
|
|
||||||
if( !this.timeStamp )
|
// timeStamp is buggy for some events on Firefox(#3843)
|
||||||
this.timeStamp = now();
|
// So we won't rely on the native value
|
||||||
|
this.timeStamp = now();
|
||||||
|
|
||||||
// Mark it as fixed
|
// Mark it as fixed
|
||||||
this[expando] = true;
|
this[expando] = true;
|
||||||
|
|
Loading…
Reference in a new issue