Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7991

Show
Ignore:
Timestamp:
10/22/07 13:14:56 (10 months ago)
Author:
tobie
Message:

prototype: In IE, allow opacity to be set on elements not yet attached to the document. Closes #9904.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • spinoffs/prototype/trunk/CHANGELOG

    r7990 r7991  
    11*SVN* 
     2 
     3* In IE, allow opacity to be set on elements not yet attached to the document. Closes #9904. [Thomas Fuchs, dcpedit, Tobie Langel] 
    24 
    35* Avoid the try..catch block in Ajax.Response#_getResponseJSON unless required. [Tobie Langel] 
  • spinoffs/prototype/trunk/src/dom.js

    r7927 r7991  
    748748    } 
    749749    element = $(element); 
    750     if (!element.currentStyle.hasLayout) element.style.zoom = 1; 
     750    var currentStyle = element.currentStyle; 
     751    if ((currentStyle && !currentStyle.hasLayout) || 
     752      (!currentStyle && element.style.zoom == 'normal')) 
     753        element.style.zoom = 1; 
     754     
    751755    var filter = element.getStyle('filter'), style = element.style; 
    752756    if (value == 1 || value === '') { 
  • spinoffs/prototype/trunk/test/unit/dom.html

    r7989 r7991  
    224224 
    225225<div id="style_test_3">blah</div> 
     226<span id="style_test_4">blah</span> 
     227<span id="style_test_5">blah</span> 
    226228 
    227229<div id="style_test_dimensions_container"> 
     
    10861088        $('style_test_3').setOpacity(0.9999999).getStyle('opacity') > 0.999 
    10871089      ); 
    1088        
     1090      if (Prototype.Browser.IE) { 
     1091        assert($('style_test_4').setOpacity(0.5).currentStyle.hasLayout); 
     1092        assert(2, $('style_test_5').setOpacity(0.5).getStyle('zoom')); 
     1093        assert(0.5, new Element('div').setOpacity(0.5).getOpacity()); 
     1094        assert(2, new Element('div').setOpacity(0.5).setStyle('zoom: 2;').getStyle('zoom')); 
     1095        assert(2, new Element('div').setStyle('zoom: 2;').setOpacity(0.5).getStyle('zoom')); 
     1096      } 
    10891097    }}, 
    10901098