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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to