Fix Opera 9.5 strict issue that swaps documentElement.clientHeight with body.clientHeight.
This commit is contained in:
parent
67107651c2
commit
34798f0d74
|
@ -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;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue