Bug Tracker

Modify

Ticket #6875 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

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

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

Change History

Changed 3 years ago by jas

Selector test case

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:

  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 3 years ago by jas

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.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.