Skip to main content

Bug Tracker

Side navigation

#9452 closed bug (invalid)

Opened May 28, 2011 01:10PM UTC

Closed June 17, 2011 08:00AM UTC

Last modified March 09, 2012 03:51AM UTC

focus event does not bubble correctly

Reported by: anonymous Owned by: anonymous
Priority: undecided Milestone:
Component: event Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:

Upon focusing an input the event does not bubble up to the parent correctly. I tried in Firefox 4 and Chrome 11. Using the workaround with 'focusin' as I understand is done for IE works properly.


Focusing the element should log these six messages:

jQuery focusin, input

jQuery focusin, parent

native focus, parent

native focus, input

jQuery focus, parent

jQuery focus, input

But the "jQuery focus, parent" is never logged.

Attachments (0)
Change History (5)

Changed June 01, 2011 05:59PM UTC by dmethvin comment:1

owner: → anonymous
status: newpending

Seems like it is working properly. The focusin and focusout events are the bubbling versions. Or have I misinterpreted the test case?

Changed June 02, 2011 12:42PM UTC by comment:2

The question is why the jQuery 'focus' event does not bubble. 'focusin' (and 'focusout') work properly. I don't think it is intentional since the native focus event does bubble. I may have misunderstood something though..

Changed June 17, 2011 08:00AM UTC by trac-o-bot comment:3

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Changed June 30, 2011 01:18PM UTC by dmethvin comment:4

component: unfiledevent

Just to follow up, the W3C says that the focus event does not bubble so jQuery is doing the right thing.

For .live() and .delegate() we currently transform the focus event to focusin so that it will work at all, but I'm not in favor of doing that for .bind() because it will only add to the confusion. If you're doing manual event delegation with .bind() then use the bubbling focusin event.

Changed July 02, 2011 10:14PM UTC by comment:5

In light of comment 4 I agree that this bug is indeed invalid. Thanks for the clarification!