Bug Tracker

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#8025 closed bug (invalid)

Attribute selector not working in IE8 compatibility mode

Reported by: dmw_30@… Owned by:
Priority: low Milestone: 1.next
Component: selector Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:

Description

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 9 years ago by danheberden

Component: unfiledattributes
Priority: undecidedlow
Status: newopen
Version: 1.4.41.5b1

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 9 years ago by dmw_30@…

Thank you! The workaround fixed the problem for me.

comment:4 Changed 9 years ago by timmywil

Component: attributesselector

comment:5 Changed 9 years ago by timmywil

Version: 1.5b11.5.2

comment:6 Changed 8 years ago by john

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