Bug Tracker

Opened 12 years ago

Closed 11 years ago

#2198 closed bug (invalid)

Simple selectors fail on older non-validating document

Reported by: jlewin Owned by:
Priority: major Milestone: 1.2.3
Component: core Version: 1.2.2
Keywords: Cc:
Blocked by: Blocking:

Description

Didn't see instructions for logging bugs - hope this seems ok. Having an issue running simple selectors against a non-validating document - I'll be fixing it soon but since I couldn't find documentation stating pages need to be valid, I'm assuming it should normally work. Repro steps below describe the problem with class based selectors but the issue is also hit with tag based ala $("body").

Repro Steps

  1. Open http://www.skateatlas.com/
  2. Add some .parklink elements to the document - click on Portland, Oregon the left hand bar should update showing nearby parks
  3. Open the FireBug window and switch to the Console tab
  4. Issue the following console command $(".parklink")
  5. Confirm an empty jQuery object is returned
  6. Switch to the Script tab
  7. Open the jQuery-1.2.2.js source file - select from drop list box above Script window
  8. Goto Line #130 and place a breakpoint
  9. Return to the command window and reissue $(".parklink")
  10. When the breakpoint is hit, confirm elems contains matching DOM elements
  11. Step over the statement and check the value of the ret variable
  12. Confirm ret is empty

Expected Results

I would have expected the matched values in the elems object to exist in the new ret object

Change History (2)

comment:1 Changed 12 years ago by jlewin

So basically it finds the elements by className but then in closing requeries jQuery passing in a DOMElement array at which point it loses them...

comment:2 Changed 11 years ago by dmethvin

Resolution: invalid
Status: newclosed

Couldn't reproduce given the steps above. Reopen with a test case if the problem is still there in 1.2.6.

Note: See TracTickets for help on using tickets.