Is your target element visible? I hit this same problem with IE8 in
our app for elements that were created with display:none;, IE8 seems
to think they don't have the right offsetParent. To fix, I simply made
them visible before calling clonePosition and the parent delta was
included correctly in the positioning.

Have been meaning to put something in Lighthouse about this when I
have time, I couldn't see anything that already addresses this
problem. I'm not sure what the cleanest solution is because if the
element is visible then it appears to behaves correctly.

 -- Rod


On Mar 25, 2:08 am, ced <catcal...@gmail.com> wrote:
> I had a problem cloning position with prototype 1.4 and 1.6 in ie8
> don't know exactly why it behaves like this.. but that's my solution:
> hope it could be useful:
>
> In 1.4  I changed this
>
> if (Element.getStyle(target,'position') == 'absolute') {
>       parent = Position.offsetParent(target);
>       delta = Position.page(parent);
>
> }
>
> with this:
>
> if (Element.getStyle(target,'position') == 'absolute') {
>       parent = Position.offsetParent(target);
>       delta =  (navigator.appVersion.indexOf('MSIE 8')>0)?Position.page
> (source):Position.page(parent);
>
> }
>
> if (navigator.appVersion.indexOf('MSIE 8')>0){
>         delta[0]-=source.offsetLeft;
>         delta[1]-=source.offsetTop;
>
> }
>
> the solution is identical for 1.6 but instead of Position.page(parent)
> I used page.viewportOffset() as it was

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to