So still reading docs... and the facts is in the Drag.Move

var offsetParent = this.element.getOffsetParent()


but:

Element Method: getOffsetParent

Returns the parent of the element that is positioned, if there is one.


so could happen that variable in the Drag.Move is null also its properties.

Right?

Andrea

On Thu, Sep 16, 2010 at 16:34, Andrea Dessì <nkj...@gmail.com> wrote:

> Hi all,
>
> playing a bit with Drag.Move and I'm getting
> "offsetParent is null or is not an object" when setting the container
> to
> the Drag.Move istance:
>
> Example:
> http://mootools.net/shell/PLfcD/
>
> The null offsetParent is in the calculateLimit function:
>
> calculateLimit: function(){
>        var offsetParent = this.element.getOffsetParent(),
>        containerCoordinates = this.container.getCoordinates(offsetParent),
>        containerBorder = {},
>        elementMargin = {},
>        elementBorder = {},
>        containerMargin = {},
>        offsetParentPadding = {};
>
>        ['top', 'right', 'bottom', 'left'].each(function(pad){
>                containerBorder[pad] = this.container.getStyle('border-' +
> pad).toInt();
>                elementBorder[pad] = this.element.getStyle('border-' +
> pad).toInt();
>                elementMargin[pad] = this.element.getStyle('margin-' +
> pad).toInt();
>                containerMargin[pad] = this.container.getStyle('margin-' +
> pad).toInt();
>                offsetParentPadding[pad] = offsetParent.getStyle('padding-'
> +
> pad).toInt();  /////error here!
>        }
> }, this);
>
>
> So the error seems to happen beause IE cannot recognize "offsetParent"
> as an html element.
> Can you confirm this problem? :)
>
> --
> Andrea
>
>
>

Reply via email to