Opened 13 years ago
Closed 13 years ago
#5514 closed enhancement (fixed)
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)
Note: See
TracTickets for help on using
tickets.
updated withinElement function