Fix for #1185
This commit is contained in:
parent
2c33101693
commit
3c5340d146
|
@ -41,7 +41,17 @@ jQuery.event = {
|
||||||
|
|
||||||
if (!element.$handle)
|
if (!element.$handle)
|
||||||
element.$handle = function() {
|
element.$handle = function() {
|
||||||
jQuery.event.handle.apply(element, arguments);
|
// returned undefined or false
|
||||||
|
var val;
|
||||||
|
|
||||||
|
// Handle the second event of a trigger and when
|
||||||
|
// an event is called after a page has unloaded
|
||||||
|
if ( typeof jQuery == "undefined" || jQuery.event.triggered )
|
||||||
|
return val;
|
||||||
|
|
||||||
|
val = jQuery.event.handle.apply(element, arguments);
|
||||||
|
|
||||||
|
return val;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Get the current list of functions bound to this event
|
// Get the current list of functions bound to this event
|
||||||
|
@ -138,7 +148,7 @@ jQuery.event = {
|
||||||
data.unshift( this.fix({ type: type, target: element }) );
|
data.unshift( this.fix({ type: type, target: element }) );
|
||||||
|
|
||||||
// Trigger the event
|
// Trigger the event
|
||||||
if ( (val = this.handle.apply( element, data )) !== false )
|
if ( (val = element.$handle.apply( element, data )) !== false )
|
||||||
this.triggered = true;
|
this.triggered = true;
|
||||||
|
|
||||||
if ( fn && val !== false && !jQuery.nodeName(element, 'a') )
|
if ( fn && val !== false && !jQuery.nodeName(element, 'a') )
|
||||||
|
@ -152,11 +162,6 @@ jQuery.event = {
|
||||||
// returned undefined or false
|
// returned undefined or false
|
||||||
var val;
|
var val;
|
||||||
|
|
||||||
// Handle the second event of a trigger and when
|
|
||||||
// an event is called after a page has unloaded
|
|
||||||
if ( typeof jQuery == "undefined" || jQuery.event.triggered )
|
|
||||||
return val;
|
|
||||||
|
|
||||||
// Empty object is for triggered events with no data
|
// Empty object is for triggered events with no data
|
||||||
event = jQuery.event.fix( event || window.event || {} );
|
event = jQuery.event.fix( event || window.event || {} );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue