Ticket #1769: 1769.patch
File 1769.patch, 3.2 KB (added by , 15 years ago) |
---|
-
editor/_source/classes/fckpanel.js
217 217 relElement ) ; 218 218 219 219 // Minus the offsets provided by any positioned parent element of the panel iframe. 220 var positionedAncestor = FCKDomTools.GetPositionedAncestor( FCKTools.GetElementWindow( this._IFrame ),this._IFrame.parentNode ) ;220 var positionedAncestor = FCKDomTools.GetPositionedAncestor( this._IFrame.parentNode ) ; 221 221 if ( positionedAncestor ) 222 222 { 223 223 var nPos = FCKTools.GetDocumentPosition( FCKTools.GetElementWindow( positionedAncestor ), positionedAncestor ) ; -
editor/_source/internals/fckdomtools.js
924 924 style[ styleName ] = styleDict[ styleName ] ; 925 925 }, 926 926 927 GetCurrentElementStyle : function( w, element, attrName )927 GetCurrentElementStyle : function( element, propertyName ) 928 928 { 929 929 if ( FCKBrowserInfo.IsIE ) 930 return element.currentStyle[ attrName] ;930 return element.currentStyle[ propertyName ] ; 931 931 else 932 return w.getComputedStyle( element, '' )[attrName];932 return element.ownerDocument.defaultView.getComputedStyle( element, '' ).getPropertyValue( propertyName ) ; 933 933 }, 934 934 935 GetPositionedAncestor : function( w,element )935 GetPositionedAncestor : function( element ) 936 936 { 937 937 var currentElement = element ; 938 938 while ( currentElement != FCKTools.GetElementDocument( currentElement ).documentElement ) 939 939 { 940 if ( this.GetCurrentElementStyle( w,currentElement, 'position' ) != 'static' )940 if ( this.GetCurrentElementStyle( currentElement, 'position' ) != 'static' ) 941 941 return currentElement ; 942 942 currentElement = currentElement.parentNode ; 943 943 } … … 966 966 // Consider the margin in the scroll, which is ok for our current 967 967 // needs, but needs investigation if we will be using this function 968 968 // in other places. 969 offset += parseInt( this.GetCurrentElementStyle( window,element, 'marginBottom' ) || 0, 10 ) ;969 offset += parseInt( this.GetCurrentElementStyle( element, 'marginBottom' ) || 0, 10 ) ; 970 970 } 971 971 972 972 // Appends the offsets for the entire element hierarchy. -
editor/_source/internals/fcktools.js
462 462 // 1. It matters if document.body itself is a positioned element; 463 463 // 2. It matters is when we're in IE and the element has no positioned ancestor. 464 464 // Otherwise the values should be ignored. 465 if ( FCKDomTools.GetCurrentElementStyle( w , w.document.body, 'position') != 'static'466 || ( FCKBrowserInfo.IsIE && FCKDomTools.GetPositionedAncestor( w,node ) == null ) )465 if ( FCKDomTools.GetCurrentElementStyle( w.document.body, 'position') != 'static' 466 || ( FCKBrowserInfo.IsIE && FCKDomTools.GetPositionedAncestor( node ) == null ) ) 467 467 { 468 468 x += w.document.body.offsetLeft ; 469 469 y += w.document.body.offsetTop ;