Skip to main content

Bug Tracker

Side navigation

#5514 closed enhancement (fixed)

Opened November 14, 2009 10:27PM UTC

Closed June 25, 2010 03:08AM UTC

Move try..catch outside loop in withinElement function

Reported by: R Owned by: brandon
Priority: minor Milestone: 1.4
Component: event Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

In the withinElement function used by mouseenter and mouseleave events try..catch statement is placed inside the while loop, where its task is to break the loop. So, why not place the loop inside the try..catch and let the exception stop the looping?

try {

while(parent && parent !== this){

parent = parent.parentNode;

}

} catch(e){

parent = this; // for jQuery 1.3.2 behavior. In jQuery 1.4 nightly, just skip this line

}

Attachments (1)
  • withinElement.js (0.7 KB) - added by R November 14, 2009 10:28PM UTC.

    updated withinElement function

Change History (1)

Changed June 25, 2010 03:08AM UTC by dmethvin comment:1

resolution: → fixed
status: newclosed

Fixed in 1.4.