Skip to main content

Bug Tracker

Side navigation

#7814 closed bug (invalid)

Opened December 21, 2010 12:47PM UTC

Closed December 24, 2010 01:04AM UTC

Last modified March 30, 2011 06:30PM UTC

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

Reported by: jesse@thefutureoftheweb.com Owned by:
Priority: undecided Milestone: 1.6
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:
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/

Attachments (0)
Change History (2)

Changed December 24, 2010 01:04AM UTC by snover comment:1

resolution: → invalid
status: newclosed

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.

Changed March 30, 2011 06:30PM UTC by rwaldron comment:2

#8554 is a duplicate of this ticket.