Bug Tracker

Modify

Ticket #4070 (closed bug: worksforme)

Opened 4 years ago

Last modified 4 years ago

Selection of empty fields in Chrome and Safari

Reported by: brnwdrng Owned by:
Priority: major Milestone: 1.3.2
Component: unfiled Version: 1.3.1
Keywords: Cc:
Blocking: Blocked by:

Description

Selection appears to fail in two browsers: see my issue description at the Google Group jQuery(English):

 http://groups.google.com/group/jquery-en/browse_thread/thread/115907cc1870b66a/ec3d8a0e189c792e?lnk=gst&q=select+empty#ec3d8a0e189c792e

Only fails using 1.3.x

Attachments

test-4070.html Download (814 bytes) - added by dmethvin 4 years ago.

Change History

comment:1 Changed 4 years ago by dmethvin

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

The :empty selector only selects elements with no children, not elements with no value attribute.

A [value] selector will select elements with a value attribute/property. Firefox always defines value on input elements whereas Chrome does not. In most cases using input[type=text][value=''] will do what you want.

I don't think there's a bug here so I'll close the ticket.

Changed 4 years ago by dmethvin

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.