Hi, I''m using Prototype+Scriptaculous to build a UI library for the developers in our organisation, and i''ve come across a bug in the document.viewport.getDimensions() method. Prototype 1.6 uses this to retrieve the actual dimensions: $w(''width height'').each(function(d) { var D = d.capitalize(); dimensions[d] = self[''inner'' + D] || (document.documentElement[''client'' + D] || document.body[''client'' + D]); }); the problem is, both Safari and Firefox support self.innerWidth and self.innerHeight, but its the size of the WINDOW, and doesnt take into acount the scroll-bars. my understanding is that the self.innerX properties are used to get the dimensions on netscape? can this be resolved for other browsers? for the time being, i will have to rely on a different method as i dont consider scrollbars "usable" space: "The viewport is the subset of the browser window that a page occupies -- the "usable" space in a browser window" Thanks Stephen --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I might be wrong, but I think that''s been corrected in trunk. If not, could you be so kind as to open a ticket ? Thanks, Tobie On Jan 18, 5:04 am, Stephen <PenguS...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I''m using Prototype+Scriptaculous to build a UI library for the > developers in our organisation, and i''ve come across a bug in the > document.viewport.getDimensions() method. > > Prototype 1.6 uses this to retrieve the actual dimensions: > > $w(''width height'').each(function(d) { > var D = d.capitalize(); > dimensions[d] = self[''inner'' + D] || > (document.documentElement[''client'' + D] || > document.body[''client'' + D]); > }); > > the problem is, both Safari and Firefox support self.innerWidth and > self.innerHeight, but its the size of the WINDOW, and doesnt take into > acount the scroll-bars. > > my understanding is that the self.innerX properties are used to get > the dimensions on netscape? can this be resolved for other browsers? > > for the time being, i will have to rely on a different method as i > dont consider scrollbars "usable" space: > > "The viewport is the subset of the browser window that a page occupies > -- the "usable" space in a browser window" > > Thanks > > Stephen--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Jan 17, 10:09 pm, Tobie Langel <tobie.lan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I might be wrong, but I think that''s been corrected in trunk.It was, and it even made its way into 1.6.0.1. Stephen, you can get 1.6.0.1 from Subversion (or from Rails 2.0), but I''d just wait until 1.6.0.2 comes out (which will happen very, very soon). Cheers, Andrew --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---