Closed Bug 649823 Opened 14 years ago Closed 14 years ago

FF4 tests true for javascript IE Filter support

Categories

(Core :: DOM: CSS Object Model, defect)

2.0 Branch
x86
Windows 7
defect
Not set
minor

Tracking

()

RESOLVED INVALID

People

(Reporter: offworldgirl, Unassigned)

References

Details

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0 Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0 FF4 tests true in javascript feature query for IE CSS "filter" support. This breaks FF4 opacity effects. Reproducible: Always Steps to Reproduce: 1. if(typeof document.documentElement.style.filter === "string"){alert('IE Filter');}else{alert('Standards');} 2. Run javascript in a page 3. Observe which alert is triggered Actual Results: Triggers alert "IE Filter" instead of "Standards" Expected Results: It should show alert "Standards" since FF4 does not support IE "filter" method. Workaround for now is to replace if-else with two if statements: if (typeof document.documentElement.style.filter === "string"){ alert('IE Filter'); // FF4 should NOT grab this but does! } if (typeof document.documentElement.style.opacity === "string") { alert('Standards'); // FF4 also grabs this so it can override filter } So FF4 grabs the first condition as true, then subsequently grabs the second condition as true too, so it can be used to override the erroneous "filter" method being used.
Component: General → DOM: CSS Object Model
Product: Firefox → Core
QA Contact: general → style-system
Version: unspecified → 2.0 Branch
It's because SVG filter property is supported in HTML (bug 450340).
Blocks: 450340
Yep. The assumption that "filter" is an IE-only property is just wrong. We support .style.filter as required by SVG. See bug 374216 for the details.
Blocks: 374216
No longer blocks: 450340
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.