Bug Tracker

Modify

Ticket #7628 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

Incorrect documentation for event.currentTarget

Reported by: masklinn Owned by: ajpiano
Priority: low Milestone: 1.5
Component: support Version: 1.4.4
Keywords: Cc:
Blocking: Blocked by:

Description

The documentation for event.currentTarget states:

This property will always be equal to the this of the function.

but it is not the case if jQuery.proxy (or some other form of context-binding) was used. In this case, this will be the bound context while currentTarget will be the element the event was bound on (or for in the case of .live and .delegate).

Change History

comment:1 Changed 3 years ago by ajpiano

  • Keywords needsdoc added
  • Owner set to ajpiano
  • Status changed from new to assigned
  • Component changed from unfiled to support
  • Priority changed from undecided to low

comment:2 Changed 3 years ago by ajpiano

  • Status changed from assigned to closed
  • Resolution set to fixed

 http://api.jquery.com/event.currentTarget/ i added a note about this and revised the language. even though it's not a particularly high priority issue, as i think people who are using $.proxy aren't trying to use event.currentTarget as a "shortcut" to this because of this docs error. you never can be too careful though, i guess.

comment:3 Changed 3 years ago by jitter

  • Keywords needsdoc removed

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.