You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by wo...@apache.org on 2009/10/30 17:55:17 UTC
svn commit: r831385 -
/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/javascript/iframe_handler.js
Author: woonsan
Date: Fri Oct 30 16:55:17 2009
New Revision: 831385
URL: http://svn.apache.org/viewvc?rev=831385&view=rev
Log:
Adding comparison of offsetHeight with scrollHeight if it is available. (See APA-19.)
Modified:
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/javascript/iframe_handler.js
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/javascript/iframe_handler.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/javascript/iframe_handler.js?rev=831385&r1=831384&r2=831385&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/javascript/iframe_handler.js (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/javascript/iframe_handler.js Fri Oct 30 16:55:17 2009
@@ -17,7 +17,10 @@
function iframePortlet_resetHeight(iframe) {
try {
if (iframe.contentDocument && iframe.contentDocument.body.offsetHeight) {
- iframe.height = iframe.contentDocument.body.offsetHeight + 16;
+ var offsetHeight = iframe.contentDocument.body.offsetHeight;
+ if (iframe.contentDocument.body.scrollHeight && iframe.contentDocument.body.scrollHeight > offsetHeight)
+ offsetHeight = iframe.contentDocument.body.scrollHeight;
+ iframe.height = offsetHeight + 16;
} else if (iframe.Document && iframe.Document.body.scrollHeight) {
iframe.height = iframe.Document.body.scrollHeight;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org