Ticket #3399 (closed bug: duplicate)
attribute selector does not match style attribute
|Reported by:||aaroncrane||Owned by:||anonymous|
Attribute selectors of the form 'div[style]' and 'div[title]' do not work as I expect.
I expect 'div[style]' to match every <div> element that bears a style= attribute (regardless of whether that attribute's value is the empty string), and not to match any <div> elements that do not bear any style= attribute.
However, that selector matches every <div>, regardless of whether it has a style= attribute.
I have similar expectations for 'div[title]', except with the title= attribute rather than style=. That selector correctly excludes <div> elements with no title= attribute, but it incorrectly matches <div title=""> elements (with an empty string as the attribute value).
Reductions for both situations are attached. I expect each reduction to display three green-background boxes saying "OK"; a failure is indicated as a red-background box saying "FAIL".
I have tested this in Firefox 2, Firefox 3, Safari 3.0, and Opera 9.5; it behaves the same way in all of them.
- Cc flesler added
- Status changed from new to assigned
- Component changed from unfilled to selector
- Milestone set to 1.3
- Status changed from assigned to new
- Summary changed from Inconsistent results with attribute selectors in jQuery 1.2.6 to attribute selector does not match style attribute
- Priority changed from major to low
- Version changed from 1.2.6 to 1.4.2
- Milestone changed from 1.3 to 1.4.3
- Owner changed from flesler to anonymous
- Status changed from new to closed
- Resolution set to duplicate