Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#8773 closed bug (invalid)

jQuery.support.optSelected bug

Reported by: [email protected] Owned by: [email protected]
Priority: low Milestone: 1.next
Component: support Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:


jQuery.support.optSelected does not work correctly in IE, it returns "false" (for pseudo element) but I got "true" (for real element). For example I propose to look at the small test in the different browsers(IE6-8, Opera, Safari and FF) http://www.khai202.ho.ua/opt_selected_bug.html.

I got following results:

  • IE6 : false , false , true , true;
  • IE7 : false , false , true , true;
  • Chrome 10.0.648.204 : true, true, true , true;
  • Opera 11.01 : true, true, true , true;
  • Safari 5.0.3 : true, true, true , true;

To fix this bug you should replace reference to option through childNodes. Then this .optSelected property will not be necessary.

Change History (5)

comment:1 Changed 12 years ago by Rick Waldron

Component: unfiledsupport
Owner: set to [email protected]
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket! Be sure to test against the jQuery Edge version to ensure the issue still exists.

comment:2 Changed 12 years ago by panasenko

Hi. Sorry for not immediately added code through jsFiddle. http://jsfiddle.net/ZKyNs/. I don't undrestand what is jQuery Edge.

comment:3 Changed 12 years ago by timmywil

Working test case: http://jsfiddle.net/ZKyNs/2/

comment:4 Changed 12 years ago by timmywil

Priority: undecidedlow
Resolution: invalid
Status: pendingclosed

All 3 need to be normalized. The behavior of optSelected is correct.

comment:5 Changed 12 years ago by anonymous

Hi. If I understood correctly normalized tree doesn't contain extra TextNodes. In following test I lined all tags, but the result is the same. http://jsfiddle.net/ZKyNs/6/

Note: See TracTickets for help on using tickets.