From 34798f0d742914eaf5493cf59f9b0884795ae5a1 Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Tue, 20 May 2008 14:37:23 -0500 Subject: [PATCH] Fix Opera 9.5 strict issue that swaps documentElement.clientHeight with body.clientHeight. --- src/dom.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dom.js b/src/dom.js index 8c82900..ce87673 100644 --- a/src/dom.js +++ b/src/dom.js @@ -1176,12 +1176,11 @@ Element.addMethods = function(methods) { document.viewport = { getDimensions: function() { - var dimensions = { }; - var B = Prototype.Browser; + var dimensions = { }, B = Prototype.Browser; $w('width height').each(function(d) { var D = d.capitalize(); dimensions[d] = (B.WebKit && !document.evaluate) ? self['inner' + D] : - (B.Opera) ? document.body['client' + D] : document.documentElement['client' + D]; + (B.Opera && opera.version() < 9.5) ? document.body['client' + D] : document.documentElement['client' + D]; }); return dimensions; },