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)
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.
Updated•14 years ago
|
Component: General → DOM: CSS Object Model
Product: Firefox → Core
QA Contact: general → style-system
Version: unspecified → 2.0 Branch
Comment 1•14 years ago
|
||
It's because SVG filter property is supported in HTML (bug 450340).
Blocks: 450340
Comment 2•14 years ago
|
||
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.
You need to log in
before you can comment on or make changes to this bug.
Description
•