ehsmeng
2008-Jun-25 14:57 UTC
Prototype 1.6.0.2 + Opera 9.50 + document.viewport.getDimensions();
Hi, It seems like document.viewport.getDimensions() reports the entire page size rather than the viewport on my Opera 9.50. document.viewport.getDimensions() works as expected on IE6-7, FF2-3 etc. Could anyone confirm this? Best regards, Marcus --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
jdetaeye
2008-Jul-07 16:54 UTC
Re: Prototype 1.6.0.2 + Opera 9.50 + document.viewport.getDimensions();
I noticed the same behavior and patched my copy of the prototype.js file: ... document.viewport = { getDimensions: function() { var dimensions = { }; var B = Prototype.Browser; $w(''width height'').each(function(d) { var D = d.capitalize(); dimensions[d] = (B.WebKit && !document.evaluate) ? self[''inner'' + D] : (B.Opera && parseFloat(opera.version)<9.5) ? document.body[''client'' + D]) : document.documentElement[''client'' + D]; document.documentElement[''client'' + D]; }); return dimensions; }, ... The original code has: (B.Opera) as the condition, which I changed to: (B.Opera && parseFloat(opera.version)<9.5) Regards, Johan On 25 jun, 16:57, ehsmeng <ehsm...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > It seems like document.viewport.getDimensions() reports the entire > page size rather than the viewport on my Opera 9.50. > document.viewport.getDimensions() works as expected on IE6-7, FF2-3 > etc. Could anyone confirm this? > > Best regards, > Marcus--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
jdalton
2008-Jul-07 17:20 UTC
Re: Prototype 1.6.0.2 + Opera 9.50 + document.viewport.getDimensions();
This has been patched for the next release (1.6.0.3) :) http://github.com/sstephenson/prototype/tree/master/src/dom.js#L1326 - JDD --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---