Skip to main content

Bug Tracker

Side navigation

#7628 closed bug (fixed)

Opened November 24, 2010 08:38PM UTC

Closed November 24, 2010 09:04PM UTC

Last modified December 14, 2010 11:50PM UTC

Incorrect documentation for event.currentTarget

Reported by: masklinn Owned by: ajpiano
Priority: low Milestone: 1.5
Component: support Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:
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).

Attachments (0)
Change History (3)

Changed November 24, 2010 08:49PM UTC by ajpiano comment:1

component: unfiledsupport
keywords: → needsdoc
owner: → ajpiano
priority: undecidedlow
status: newassigned

Changed November 24, 2010 09:04PM UTC by ajpiano comment:2

resolution: → fixed
status: assignedclosed

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.

Changed December 14, 2010 11:50PM UTC by jitter comment:3

keywords: needsdoc