Bug Tracker

Opened 13 years ago

Closed 12 years ago

#5837 closed bug (fixed)

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>

Change History (4)

comment:1 in reply to:  description Changed 13 years ago by megaman

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

comment:2 Changed 13 years ago by lvbeck

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

comment:3 Changed 12 years ago by dmethvin

Status: newopen

comment:4 Changed 12 years ago by danheberden

Resolution: fixed
Status: openclosed

Fixed

Note: See TracTickets for help on using tickets.