This project is archived and is in readonly mode.

#88 ✓invalid
UloPe

Element.getOffsets() broken on IE7

Reported by UloPe | June 3rd, 2008 @ 06:55 PM | in 2.0 (closed)

Element.getOffsets() returns much to small values for IE7.

The Following patch fixed it for me:

--- Element.Dimensions.js-r1555 2008-06-03 19:48:24.000000000 +0200

+++ Element.Dimensions.js-r1555-ie7fix 2008-06-03 19:48:43.000000000 +0200

@@ -83,7 +83,7 @@

}

element = element.offsetParent;

- if (Browser.Engine.trident){

+ if (Browser.Engine.trident4){

while (element && !element.currentStyle.hasLayout) element = element.offsetParent;

}

}

Comments and changes to this ticket

  • csuwldcat

    csuwldcat August 20th, 2008 @ 06:44 PM

    • Assigned user changed from “Valerio” to “Thomas Aylott”
    • Tag set to defect, major, patch

    I would like to confirm this bug, we tracked it down and it is causing what appears to be an infinite loop as it ascends the DOM. We are deep into coding this app and it is basically a show-stopper. Please advise.

  • csuwldcat

    csuwldcat August 20th, 2008 @ 06:45 PM

    • Assigned user changed from “Thomas Aylott” to “Valerio”

    Oops! I didn't mean to change the Responsibility selection!

  • Jan Kassens

    Jan Kassens August 20th, 2008 @ 07:59 PM

    • State changed from “new” to “hold”

    Can you please attach a testcase?

  • csuwldcat

    csuwldcat August 21st, 2008 @ 09:50 PM

    I think we may have a test case for you in a day or two. We have been using Moo for a couple years now and this is the first bug I personally have ever seen so please lend it some credence. Also it deals a huge blow to pages that it occurs on in IE due to apparent infinite loop. Like I said we are trying to put together an example for you. Thanks!

  • csuwldcat

    csuwldcat August 26th, 2008 @ 10:36 PM

    • Tag changed from defect, major, patch to defect, minor, patch

    Ended up being an obscure positioning bug with IE7 that causes content sections to have the quality of visibility: hidden even though it is not set to do anything of the sort. Was pretty confusing because the lib was throwing an error on the trident offsetParent line (it still is in case that means anything!) and I thought it was due to that. I still get an error in that points to the Moo lib but there is no ill effect on the page anywhere I can find...

  • hubevolution

    hubevolution September 22nd, 2008 @ 10:23 AM

    • Tag changed from defect, minor, patch to defect, patch

    I had a problem with an overflow Scroller having bad behaviour only on ie7 and I found out that getPosition() was returning bad values so applied this fix and now it works fine.

    Thanks

  • csuwldcat

    csuwldcat October 2nd, 2008 @ 07:52 AM

    SOLVED!!!

    There is really no error in the lib. For our app we had an element where we used getPosition. At some point the element was removed but get position was still being employed. It still tried to do its thing and could not find the element so it threw the cryptic error. Nothing else bad was going on in the page so I forgot to even care until recently when one of our guys looked through the stack trace of the JS. He found that in this situation a try to getPosition on an element that doesn't exist causes the error to be thrown regardless. Anyway, I am not sure if you want to throw errors on stuff like that or not. If it is expected to happen in that way then cool, case closed! :)

  • Jan Kassens

    Jan Kassens October 2nd, 2008 @ 01:52 PM

    • State changed from “hold” to “invalid”

    a revision for the dimension stuff is planned anyway, closed.

Create your profile

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

Shared Ticket Bins

Tags

Pages