OpenLayers OpenLayers

Changeset 2117

Show
Ignore:
Timestamp:
01/02/07 15:33:03 (2 years ago)
Author:
crschmidt
Message:

Patch from tschaub to fix controls in IE.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Map.js

    r2087 r2117  
    484484        var div = control.draw(px); 
    485485        if (div) { 
    486             // only elements without parents should be appended to the viewport 
    487             if(!div.parentNode) { 
     486            // Only elements without parents should be appended to the viewport. 
     487            // In IE, even elements without parents are given a parent node 
     488            // of type 11 (DOCUMENT_FRAGMENT_NODE). 
     489            if(!div.parentNode || (div.parentNode.nodeType == 11)) { 
    488490                div.style.zIndex = this.Z_INDEX_BASE['Control'] + 
    489491                                    this.controls.length;