Hey guys I''m having a problem where clonePosition returns a really large left value causing a div to be positioned in the wrong place in IE. I''ve investigated my markup and prepared a minimised example, I found that the width:100% on the wrapper div is what causes the issue. The position is nearly-correct in firefox and opera, except the body-padding/margin seems to alter where the box is positioned, in my mind it should be left aligned with the input and 16px below it (offsetTop on clonePosition) I am using the current release 1.6 and all external css/javascript files have been removed, leaving only required classes in the head tag. You can view my sample page here: http://snipersystems.co.nz/community/cumulativeoffsettest/cumulativeoffsettest.aspx Removing the % width on the wrapper isn''t really an option because then the whole site would become fixed-width. Thanks for any help provided, Gareth --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
IE7: !!(document.all && window.XMLHttpRequest), Position.prepare(); if (Prototype.Browser.IE && !Prototype.Browser.IE7) { //IE6 alert(Position.deltaY) } else { alert(Position.deltaY) } IE7 is similar to firefox --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Nicolás Sanguinetti
2008-Jan-07 19:38 UTC
Re: [Bug] [IE7] Cumulativeoffset/cloneposition issue
Prototype.Browser.IE7 = Prototype.Browser.IE && (typeof document.body.style.maxHeight != "undefined"); This works too, and IIRC the XMLHttpRequest check won''t work if the user disabled XHR from the security settings. Best, -Nicolas On Jan 7, 2008 1:33 PM, douwo <pubpri-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > IE7: !!(document.all && window.XMLHttpRequest), > > Position.prepare(); > > if (Prototype.Browser.IE && !Prototype.Browser.IE7) > { > //IE6 > alert(Position.deltaY) > } > else > { > alert(Position.deltaY) > } > > IE7 is similar to firefox > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Guys, was that intended for me to monkeypatch my prototype.js or for the core guys to work with? On Jan 8, 2008 8:38 AM, Nicolás Sanguinetti <godfoca-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Prototype.Browser.IE7 = Prototype.Browser.IE && (typeof > document.body.style.maxHeight != "undefined"); > > This works too, and IIRC the XMLHttpRequest check won''t work if the > user disabled XHR from the security settings. > > Best, > -Nicolas > > On Jan 7, 2008 1:33 PM, douwo <pubpri-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > IE7: !!(document.all && window.XMLHttpRequest), > > > > Position.prepare(); > > > > if (Prototype.Browser.IE && !Prototype.Browser.IE7) > > { > > //IE6 > > alert(Position.deltaY) > > } > > else > > { > > alert(Position.deltaY) > > } > > > > IE7 is similar to firefox > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Okay, much debugging later... The problem came from viewportOffsets but it was actually IE reporting an incorrect offsetLeft value for an element that doesn''t have layout. By using one of the hasLayout fixes, the offsetLeft property comes back correctly and the div is positioned in the correct place. I have taken the example down otherwise it is misleading. Gareth On Jan 8, 2008 10:31 AM, Gareth Evans <agrath-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Guys, was that intended for me to monkeypatch my prototype.js or for the > core guys to work with? > > > On Jan 8, 2008 8:38 AM, Nicolás Sanguinetti <godfoca-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > wrote: > > > > > Prototype.Browser.IE7 = Prototype.Browser.IE && (typeof > > document.body.style.maxHeight != "undefined"); > > > > This works too, and IIRC the XMLHttpRequest check won''t work if the > > user disabled XHR from the security settings. > > > > Best, > > -Nicolas > > > > On Jan 7, 2008 1:33 PM, douwo <pubpri-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > IE7: !!(document.all && window.XMLHttpRequest), > > > > > > Position.prepare(); > > > > > > if (Prototype.Browser.IE && !Prototype.Browser.IE7) > > > { > > > //IE6 > > > alert(Position.deltaY) > > > } > > > else > > > { > > > alert(Position.deltaY) > > > } > > > > > > IE7 is similar to firefox > > > > > > > > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---