Bug Tracker

Changes between Initial Version and Version 2 of Ticket #1970


Ignore:
Timestamp:
Nov 27, 2007, 11:36:36 AM (15 years ago)
Author:
davidserduke
Comment:

You fix looks good in my limited tests. I'm trying to think about any other possible consequences.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1970

    • Property Owner set to davidserduke
    • Property Status changed from new to assigned
  • Ticket #1970 – Description

    initial v2  
    2424Example fix:
    2525{{{
    26 #!JavaScript
    2726jQuery.fn.extend({
    2827        hover: function(f,g) {
    29                
    3028                // A private function for handling mouse 'hovering'
    3129                function handleHover(e) {
    3230                        // Check if mouse(over|out) are still within the same parent element
    3331                        var p = e.relatedTarget;
    34        
    3532                        // Traverse up the tree
    3633                        while ( p && p != this ) try { p = p.parentNode; } catch(e) { p = this; };
    37                        
    3834                        // If we actually just moused on to a sub-element, ignore it
    3935                        if ( p == this ) return true; // this was previously FALSE
    40                        
    4136                        // Execute the right function
    4237                        return (e.type == "mouseover" ? f : g).apply(this, [e]);
    4338                }
    44                
    4539                // Bind the function to the two event listeners
    4640                return this.mouseover(handleHover).mouseout(handleHover);