Fix for #504
This commit is contained in:
parent
61504d516a
commit
b06dd433b2
1 changed files with 15 additions and 5 deletions
|
@ -134,12 +134,22 @@ jQuery.event = {
|
||||||
event.pageY = event.clientY + (e.scrollTop || b.scrollTop);
|
event.pageY = event.clientY + (e.scrollTop || b.scrollTop);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check safari and if target is a textnode
|
// check if target is a textnode (safari)
|
||||||
if ( jQuery.browser.safari && event.target.nodeType == 3 ) {
|
if (event.target.nodeType == 3) {
|
||||||
// target is readonly, clone the event object
|
// store a copy of the original event object and clone because target is read only
|
||||||
event = jQuery.extend({}, event);
|
var originalEvent = event;
|
||||||
|
event = jQuery.extend({}, originalEvent);
|
||||||
|
|
||||||
// get parentnode from textnode
|
// get parentnode from textnode
|
||||||
event.target = event.target.parentNode;
|
event.target = originalEvent.target.parentNode;
|
||||||
|
|
||||||
|
// add preventDefault and stopPropagation since they will not work on the clone
|
||||||
|
event.preventDefault = function() {
|
||||||
|
return originalEvent.preventDefault();
|
||||||
|
};
|
||||||
|
event.stopPropagation = function() {
|
||||||
|
return originalEvent.stopPropagation();
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// fix preventDefault and stopPropagation
|
// fix preventDefault and stopPropagation
|
||||||
|
|
Loading…
Reference in a new issue