This project is archived and is in readonly mode.

#577 open
Jason Petrik

Element.Position.setOffsetOption Result of expression 'offsetParent' [null] is not an object.

Reported by Jason Petrik | June 17th, 2011 @ 06:26 PM | in (closed)

Upgraded from to and starting receiving "Result of expression 'offsetParent' [null] is not an object."

I saw two problems with setOffsetOption:

1) Defined parentOffset then reassigned it, then used it

2) Used a method on offsetParent, then checked if offsetParent was null.

Comments and changes to this ticket

  • fakedarren

    fakedarren July 16th, 2011 @ 05:27 PM

    • State changed from “new” to “open”
  • Arian

    Arian August 18th, 2011 @ 01:46 AM

    • Milestone set to
    • Milestone order changed from “197604” to “0”

    Your patch is a bit corrupted (can't just apply it with git am. Can't you push this to github? Also a testcase on would be great!

  • Jason Petrik

    Jason Petrik August 18th, 2011 @ 08:42 PM

    As I was stripping my code down to test in jsfiddle I found it wasn't quite what I thought it was (of course!). When an element is styled with "position: fixed !important" element.position() will throw the error above.

    I don't know why I had my element styled that way and I have removed it. It appears to be an edge case, but I have made a pull request on github (hopefully correctly).

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

People watching this ticket