Modify ↓
Ticket #5573 (closed bug: invalid)
Code inconsistency between mouseenter/mouseleave and focus/blur special events
| Reported by: | lrbabe | Owned by: | brandon |
|---|---|---|---|
| Priority: | trivial | Milestone: | 1.4 |
| Component: | event | Version: | 1.3.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
When looking at the special events for mouseenter/mouseleave and focus/blur, you will notice that 'orig' and 'fix' parameters are used in the opposite way:
// Create mouseenter and mouseleave events
jQuery.each({
mouseover: "mouseenter",
mouseout: "mouseleave"
}, function( orig, fix ) {
// Create "bubbling" focus and blur events
jQuery.each({
focus: "focusin",
blur: "focusout"
}, function( orig, fix ){
In the latter one, 'focus' is indeed the original event that need to be fixed, and 'focusin' is the event used as a fix. This order seems to be the appropriate one.
This is not a functional bug, but the linked change on github makes the code more consistent: http://github.com/lrbabe/jquery/commit/d60fffcbe5e13a78b13403404a8c6764b5f8978b
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Patch disappeared.