Bug Tracker

Modify

Ticket #7863 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

Setting value of select based on ID containing brackets does not work

Reported by: faded1@… Owned by:
Priority: low Milestone: 1.5.1
Component: selector Version: 1.4.4
Keywords: Cc:
Blocking: Blocked by:

Description

Example:

<select id="foo[bar]">
   <option>One</option>
   <option>Two</option>
   <option>Three</option>
</select>

<script type="text/javascript">
   $('#foo\\[bar\\]').val('Three'); // Does nothing in Jquery 1.4.4
</script>

Change History

comment:1 Changed 2 years ago by ajpiano

  • Status changed from new to closed
  • Resolution set to fixed

This issue has already been fixed. I know because i spent an hour the other day triaging this exact same issue with someone who found it on IRC!

 https://github.com/jeresig/sizzle/commit/786ee06119c6d040d05817545e074fbdfb0d452d

You can use the latest GIT version on jsFiddle to confirm that the behaviour is fixed.

comment:2 Changed 2 years ago by ajpiano

#7889 is a duplicate of this ticket.

comment:3 Changed 2 years ago by jitter

Duplicate of #7533

comment:4 Changed 2 years ago by john

  • Priority changed from undecided to low
  • Component changed from unfiled to selector
  • Milestone changed from 1.6 to 1.5.1

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.