Ticket #6875 (closed bug: invalid)
Selector and unexpected behavior
| Reported by: | jas | Owned by: | |
|---|---|---|---|
| Priority: | Milestone: | 1.4.2 | |
| Component: | selector | Version: | 1.4.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
The problem, when using a nested group of input elements which get created dynamically I am encountering a strange behavior in regards to using selectors.
Please see attached regarding test cases.
Attachments
Change History
Changed 3 years ago by jas
-
attachment
selector-test-case.html
added
comment:1 Changed 3 years ago by dmethvin
- Status changed from new to closed
- Resolution set to invalid
Please debug this on the forum and open a more specific bug, thanks.
comment:2 Changed 3 years ago by jas
- Status changed from closed to reopened
- Resolution invalid deleted
It has been. https://forum.jquery.com/topic/selectors-variable-assignment-and-strange-behavior
In regards to specifics:
- On a click event a new row of form elements are created with a conventional array naming scheme. (row1: txt[0][item1], txt[0][item2], row2: txt[1][item1], txt[1][item2])
- On same click event a wildcard selector is used to loop over each new row element assigning a bind event.
- During the blur bind event a replacement is done on the currently selected form element and assigned to a new variable to be used within a secondary wildcard selector.
The problem is the secondary selector returns an empty object. However upon testing and verification the wildcard selector used is accurate.
comment:3 Changed 3 years ago by dmethvin
- Status changed from reopened to closed
- Resolution set to invalid
It looks like the thread is still going on, and the "test case" is too large to show whatever problem is implied by the vague title "Selector and unexpected behavior".
There are a lot more people on the forum to help solve a problem like this, when you have a lot of code and it's not clear the problem is a bug in jQuery. This area is for reporting bugs in jQuery.
Just leave this ticket closed, and open a new one *when you have a clear description and test case that demonstrates a bug.*
Here is an example: http://dev.jquery.com/ticket/6869
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Selector test case