Skip to main content

Bug Tracker

Side navigation

#2198 closed bug (invalid)

Opened January 21, 2008 03:37AM UTC

Closed January 10, 2009 10:47PM UTC

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

Attachments (0)
Change History (2)

Changed January 21, 2008 04:38PM UTC by jlewin comment:1

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...

Changed January 10, 2009 10:47PM UTC by dmethvin comment:2

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.