Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #2392. Solves failing element filter test in IE10. #2393

Merged
merged 1 commit into from
Aug 6, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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