Is there any specific reason that context is set to the element for $(elem)? Could it not be document unless an alternative is given: $(elem, context)
Index: src/core.js =================================================================== --- src/core.js (revision 6520) +++ src/core.js (working copy) @@ -53,7 +53,8 @@ // Handle $(DOMElement) if ( selector.nodeType ) { - this.context = this[0] = selector; + this[0] = selector; + this.context = context || document; this.length++; return this; } -- Mark 2009/7/28 John Resig <jere...@gmail.com>: > Yeah, it broke other stuff as well, already backed out. > > --John > > > On Tue, Jul 28, 2009 at 7:46 AM, Mark Gibson <jollyt...@gmail.com> wrote: >> >> Any event handlers that follow this pattern no longer work: >> >> $('.container').bind('click', function(event) { >> $(event.target).closest('.clickable').doSomething(); >> }); >> >> as the context is set to event.target >> >> Demo: >> http://jsbin.com/ataxe >> >> Ticket: >> http://dev.jquery.com/ticket/4986 >> >> > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---