Bug Tracker

Modify

Ticket #7814 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

[value=""] does not consider value of inputs

Reported by: jesse@… Owned by:
Priority: undecided Milestone: 1.6
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocking: Blocked by:

Description

Searching for inputs with empty values comes back with false matches if there is a value="" provided in the HTML.

For example:

$('<input value=""/>').val('test').is('[value=""]')

will return true, even though there is a value, whereas:

$('<input/>').val('test').is('[value=""]')

will correctly return false.

Test case here:  http://jsfiddle.net/nmffK/

Change History

comment:1 Changed 3 years ago by snover

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

Thanks for the report, but this is not a jQuery bug. Just because the value property changes does not mean that the value attribute changes.

comment:2 Changed 3 years ago by rwaldron

#8554 is a duplicate of this ticket.

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.