Bug Tracker

Opened 12 years ago

Closed 12 years ago

#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:
Blocked by: Blocking:


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 (2)

selector-test-case.html (6.4 KB) - added by jas 12 years ago.
Selector test case
selector-test-case (3.2 KB) - added by jas 12 years ago.

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by jas

Attachment: selector-test-case.html added

Selector test case

comment:1 Changed 12 years ago by dmethvin

Resolution: invalid
Status: newclosed

Please debug this on the forum and open a more specific bug, thanks.

comment:2 Changed 12 years ago by jas

Resolution: invalid
Status: closedreopened

It has been. https://forum.jquery.com/topic/selectors-variable-assignment-and-strange-behavior

In regards to specifics:

  1. 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])
  2. On same click event a wildcard selector is used to loop over each new row element assigning a bind event.
  3. 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.

Changed 12 years ago by jas

Attachment: selector-test-case added

comment:3 Changed 12 years ago by dmethvin

Resolution: invalid
Status: reopenedclosed

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

Note: See TracTickets for help on using tickets.