Skip to content

Commit

Permalink
Merge pull request #2393 from brianedgerton/ie10-specs-element-style-…
Browse files Browse the repository at this point in the history
…filters

Fixes #2392. Solves failing element filter test in IE10.
  • Loading branch information
cpojer committed Aug 6, 2012
2 parents ae73970 + 797e8dd commit 302ba55
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Specs/1.3client/Element/Element.Style.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 302ba55

Please sign in to comment.