Skip to main content

Bug Tracker

Side navigation

#8025 closed bug (invalid)

Opened January 20, 2011 06:33PM UTC

Closed July 12, 2011 04:52PM UTC

Last modified March 10, 2012 08:11AM UTC

Attribute selector not working in IE8 compatibility mode

Reported by: dmw_30@yahoo.com 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.

Attachments (0)
Change History (6)

Changed January 20, 2011 08:21PM UTC by danheberden comment:1

Changed January 20, 2011 08:34PM UTC by danheberden comment:2

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.

Changed January 20, 2011 08:56PM UTC by dmw_30@yahoo.com comment:3

Thank you! The workaround fixed the problem for me.

Changed April 15, 2011 03:39AM UTC by timmywil comment:4

component: attributesselector

Changed April 15, 2011 03:39AM UTC by timmywil comment:5

version: 1.5b11.5.2

Changed July 12, 2011 04:52PM UTC by john comment:6

resolution: → invalid
status: openclosed