Bug Tracker

Ticket #5573 (closed bug: invalid)

Opened 5 years ago

Last modified 4 years ago

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

comment:1 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

Patch disappeared.

Note: See TracTickets for help on using tickets.