Ticket #4538 (closed bug: invalid)
pushStack generates wrong selector properties, if you use multiple selectors
| Reported by: | trixi | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | core | Version: | 1.3.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
If you use a multiple Selector like $('.context-1, .context-2').find('a'). The pushStack method creates the following selector-property: '.context-1, .context-2 a'. I have added a patch, wich adds support for the traversing methods: find, children, next and siblings.
Attachments
Change History
comment:3 follow-up: ↓ 5 Changed 3 years ago by dmethvin
- Keywords needsreview added
- Status changed from new to closed
- Resolution set to invalid
- Milestone 1.4 deleted
The .selector property isn't publicly documented. It's used for .live but that is not supported in combination with filtering methods such as .find(). It is not our intention to provide a documented and always-accurate .selector property. Do not use the .selector property for any external needs. It may be changed in the future. The first rule of the .selector property is that you don't talk about the selector property.
comment:5 in reply to: ↑ 3 Changed 2 years ago by jitter
Replying to dmethvin:
The .selector property isn't publicly documented.
Ummm... the property is documented publicly http://api.jquery.com/selector/ but it also has a warning
[...] if DOM traversal methods have been called on the object, the string may not be a valid jQuery selector expression.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

