Bug Tracker

Modify

Ticket #5573 (closed bug: invalid)

Opened 4 years ago

Last modified 3 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 3 years ago by dmethvin

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

Patch disappeared.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.