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
on 2008-06-25 16:59
on 2008-07-07 18:55
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 2008-07-07 19:20
This has been patched for the next release (1.6.0.3) :) http://github.com/sstephenson/prototype/tree/maste... - JDD