Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#8025 closed bug (invalid)

Attribute selector not working in IE8 compatibility mode

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


In IE8 with compatibility mode enabled, this selector doesn't work:

$('#ctl00_contentPagePanel_lstActivities option[selected="selected"]').text()

However this selector does work:

$('#ctl00_contentPagePanel_lstActivities option:eq[0]').text()

If I turn off compatibility mode, the first selector works fine. This indicates there is a problem with the attribute selector as defined above in comp mode.

Change History (6)

comment:2 Changed 12 years ago by danheberden

Component: unfiledattributes
Priority: undecidedlow
Status: newopen

Verified IE8 compat is pulling the selected dom property instead of the selected attribute.

For your code/use, you can use option:selected to achieve a cross-browser solution.

comment:3 Changed 12 years ago by [email protected]

Thank you! The workaround fixed the problem for me.

comment:4 Changed 12 years ago by timmywil

Component: attributesselector

comment:5 Changed 12 years ago by timmywil

Version: 1.5b11.5.2

comment:6 Changed 12 years ago by john

Resolution: invalid
Status: openclosed
Note: See TracTickets for help on using tickets.