Permalink
Browse files

Merge pull request #2393 from brianedgerton/ie10-specs-element-style-…

…filters

Fixes #2392. Solves failing element filter test in IE10.
  • Loading branch information...
2 parents ae73970 + 797e8dd commit 302ba555f1f3fe44cd51845834986fe27d7914b3 @cpojer cpojer committed Aug 6, 2012
Showing with 12 additions and 2 deletions.
  1. +12 −2 Specs/1.3client/Element/Element.Style.js
@@ -17,8 +17,18 @@ describe('Element.set opacity', function(){
});
it('should not remove existent filters on browsers with filters', function(){
- var div = new Element('div');
- if (document.html.style.filter != null && !window.opera && !Syn.browser.gecko){
+ var div = new Element('div'),
+ supports_filters;
+
+ if (Syn.browser.msie) {
+ var UA = navigator.userAgent.toLowerCase().match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/),
+ version = parseFloat(UA[2]);
+ supports_filters = (version < 10);
+ } else {
+ supports_filters = (document.html.style.filter !== null && !window.opera && !Syn.browser.gecko);
+ }
+
+ if (supports_filters){
div.style.filter = 'blur(strength=50)';
div.set('opacity', 0.4);
expect(div.style.filter).toMatch(/blur\(strength=50\)/i);

0 comments on commit 302ba55

Please sign in to comment.