Opened 16 years ago
Closed 15 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
- Open http://www.skateatlas.com/
- Add some .parklink elements to the document - click on Portland, Oregon the left hand bar should update showing nearby parks
- Open the FireBug window and switch to the Console tab
- Issue the following console command $(".parklink")
- Confirm an empty jQuery object is returned
- Switch to the Script tab
- Open the jQuery-1.2.2.js source file - select from drop list box above Script window
- Goto Line #130 and place a breakpoint
- Return to the command window and reissue $(".parklink")
- When the breakpoint is hit, confirm elems contains matching DOM elements
- Step over the statement and check the value of the ret variable
- 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 16 years ago by
comment:2 Changed 15 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Couldn't reproduce given the steps above. Reopen with a test case if the problem is still there in 1.2.6.
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...