Bug Tracker

Opened 15 years ago

Closed 15 years ago

#1771 closed bug (invalid)

$( '*', context ) selects METAs from outside of context

Reported by: aercolino Owned by:
Priority: major Milestone: 1.2.2
Component: core Version: 1.2.1
Keywords: meta Cc:
Blocked by: Blocking:


In IE and in FF, jQuery 1.2.1 selects METAs, if they are added after page load by means of document.createElement

Here is a test that shows the problem: hover on $( '*' )...

See also: http://dev.jquery.com/ticket/1631

Change History (4)

comment:1 Changed 15 years ago by davidserduke

I'm afraid this might be a bug in your test case.

The process in the test case appears to be:

  1. set b to all elements
  2. set p to only elements in .playground
  3. set bnp to be elements that are in b and removing those in the playground
  4. set hover functions
  5. add meta tag (note this will NOT be in bnp)
  6. on hover, set s to all elements
  7. set t to s removing bnp (that doesn't include the new meta)
  8. t now includes everything in the playground plus the new meta

I believe if you move that meta creation to before the creation of b, p, and bnp then it will work as you expect.

Skpye must be adding the meta tag at some point after jQuery is ready (perhaps window.onload?).

So as near as I can tell at this point, this is not a jQuery bug.

comment:2 Changed 15 years ago by aercolino

Great job, davidserduke !! My mistake.

I'm going not to post again so late at night again... I promise.

comment:3 Changed 15 years ago by davidserduke

No problem of course.

comment:4 Changed 15 years ago by john

Resolution: invalid
Status: newclosed

Thanks David for spotting this!

Note: See TracTickets for help on using tickets.