Side navigation
Ticket #42: jquery-safari-hover.2.diff
File jquery-safari-hover.2.diff, 0.6 KB (added by adrian@radbox.org, July 09, 2006 01:33AM UTC)
patch to jQuery 1.0a fixes bug under Safari (tested in Safari 2.0.4 and Firefox 1.5.0.4)
--- jquery-1.0a.js 2006-07-01 07:15:52.000000000 -0700
+++ jquery-1.0a-fixed.js 2006-07-08 18:23:16.000000000 -0700
@@ -878,7 +878,10 @@
// A private function for haandling mouse 'hovering'
function handleHover(e) {
// Check if mouse(over|out) are still within the same parent element
- var p = e.fromElement || e.toElement || e.relatedTarget;
+ if (e.type == "mouseover")
+ var p = e.fromElement || e.relatedTarget;
+ else
+ var p = e.toElement || e.relatedTarget;
while ( p && p != this ) p = p.parentNode;
// If we actually just moused on to a sub-element, ignore it
Download in other formats:
Original Format
File jquery-safari-hover.2.diff, 0.6 KB (added by adrian@radbox.org, July 09, 2006 01:33AM UTC)
patch to jQuery 1.0a fixes bug under Safari (tested in Safari 2.0.4 and Firefox 1.5.0.4)
--- jquery-1.0a.js 2006-07-01 07:15:52.000000000 -0700
+++ jquery-1.0a-fixed.js 2006-07-08 18:23:16.000000000 -0700
@@ -878,7 +878,10 @@
// A private function for haandling mouse 'hovering'
function handleHover(e) {
// Check if mouse(over|out) are still within the same parent element
- var p = e.fromElement || e.toElement || e.relatedTarget;
+ if (e.type == "mouseover")
+ var p = e.fromElement || e.relatedTarget;
+ else
+ var p = e.toElement || e.relatedTarget;
while ( p && p != this ) p = p.parentNode;
// If we actually just moused on to a sub-element, ignore it