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 comment:1
Changed January 20, 2011 08:34PM UTC by comment:2
component: | unfiled → attributes |
---|---|
priority: | undecided → low |
status: | new → open |
version: | 1.4.4 → 1.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 comment:3
Thank you! The workaround fixed the problem for me.
Changed April 15, 2011 03:39AM UTC by comment:4
component: | attributes → selector |
---|
Changed April 15, 2011 03:39AM UTC by comment:5
version: | 1.5b1 → 1.5.2 |
---|
Changed July 12, 2011 04:52PM UTC by comment:6
resolution: | → invalid |
---|---|
status: | open → closed |
jsfiddle: http://jsfiddle.net/danheberden/d9Sy8/