From: Jörn Zaefferer Date: Sun, 17 Sep 2006 10:10:25 +0000 (+0000) Subject: Added proposed fix for bug #201 X-Git-Tag: 1.0.2~53 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=76188ae4572aee777e60ab3ae9fdafe17d7004f5;p=jquery.git Added proposed fix for bug #201 --- diff --git a/src/dimensions/dimensions.js b/src/dimensions/dimensions.js index a821696ee..6e6e6d6b4 100644 --- a/src/dimensions/dimensions.js +++ b/src/dimensions/dimensions.js @@ -78,7 +78,7 @@ $.fn.width = function() { $.fn.innerHeight = function() { return this.get(0) == window || this.get(0) == document ? this.height() : - this.get(0).offsetHeight - parseInt(this.css("borderTop")) - parseInt(this.css("borderBottom")); + this.get(0).offsetHeight - parseInt(this.css("borderTop") || 0) - parseInt(this.css("borderBottom") || 0); }; /** @@ -96,7 +96,7 @@ $.fn.innerHeight = function() { $.fn.innerWidth = function() { return this.get(0) == window || this.get(0) == document ? this.width() : - this.get(0).offsetWidth - parseInt(this.css("borderLeft")) - parseInt(this.css("borderRight")); + this.get(0).offsetWidth - parseInt(this.css("borderLeft") || 0) - parseInt(this.css("borderRight") || 0); }; /**