Skip to main content

Bug Tracker

Side navigation

#5837 closed bug (fixed)

Opened January 16, 2010 12:09PM UTC

Closed March 30, 2011 08:28PM UTC

the :checked selector will select a select a option in Firefox

Reported by: megaman Owned by: john
Priority: major Milestone: 1.4.1
Component: selector Version: 1.4
Keywords: Cc:
Blocked by: Blocking:
Description

As the following code, it will alert "OPTION" when document ready.

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http:www.w3.\\

org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script>

<script>

$(function(){

alert($(":checked", document).attr("nodeName"));

});

</script>

</head>

<body>

<select>

<option>this is a option</option>

</select>

</body>

</html>

Attachments (0)
Change History (4)

Changed January 16, 2010 12:12PM UTC by megaman comment:1

sorry about the wrong title, it should be "THE :CHECKED SELECTOR WILL SELECT A OPTION ELEMENT IN FIREFOX"

Changed January 21, 2010 01:01PM UTC by lvbeck comment:2

this bug happens when use :checked filter without element restriction, if use $("input:checked"), only checkbox and radio will be return.

Changed November 15, 2010 04:05AM UTC by dmethvin comment:3

Changed March 30, 2011 08:28PM UTC by danheberden comment:4

resolution: → fixed
status: openclosed

Fixed