Bug Tracker

Changeset 4013

Show
Ignore:
Timestamp:
12/04/07 18:15:27 (1 year ago)
Author:
davidserduke
Message:

Fixed #1438 where a filter could be set in IE but not have opacity in it. The JS error was fixed by checking to make sure 'opacity=' is in the filter before seeing what its value is.

Location:
trunk/jquery
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/jquery/src/core.js

    r3985 r4013  
    10651065                } 
    10661066     
    1067                 return elem.filter ?  
     1067                return elem.filter && elem.filter.indexOf("opacity=") >= 0 ? 
    10681068                    (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100).toString() : 
    10691069                    ""; 
  • trunk/jquery/test/unit/core.js

    r3985 r4013  
    381381 
    382382test("css(String, Object)", function() { 
    383     expect(18); 
     383    expect(19); 
    384384    ok( $('#foo').is(':visible'), 'Modifying CSS display: Assert element is visible'); 
    385385    $('#foo').css('display', 'none'); 
     
    405405    $('#foo').css('opacity', ''); 
    406406    ok( $('#foo').css('opacity') == '1', "Assert opacity is 1 when set to an empty String" ); 
     407    // for #1438, IE throws JS error when filter exists but doesn't have opacity in it 
     408    if (jQuery.browser.msie) { 
     409        $('#foo').css("filter", "progid:DXImageTransform.Microsoft.Chroma(color='red');"); 
     410    } 
     411    equals( $('#foo').css('opacity'), '1', "Assert opacity is 1 when a different filter is set in IE, #1438" ); 
    407412}); 
    408413