Double scrollbars are bad, this stops them where we can.
authorMike Rylander <mrylander@gmail.com>
Thu, 23 Apr 2015 21:35:09 +0000 (17:35 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 8 Jul 2015 18:12:07 +0000 (14:12 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/web/js/ui/default/staff/services/eframe.js

index fec41b7..a1f0c87 100644 (file)
@@ -35,7 +35,7 @@ angular.module('egCoreMod')
             function($scope , $window , $location , $q , $timeout , egCore) {
 
             $scope.save_space = $scope.saveSpace ? $scope.saveSpace : 300;
-            // Set the iframe height to just under the window height.
+            // Set the initial iframe height to just under the window height.
             // leave room for the navbar, padding, margins, etc.
             $scope.height = $window.outerHeight - $scope.save_space;
 
@@ -77,6 +77,9 @@ angular.module('egCoreMod')
 
                 $scope.frame = {dom:iframe};
 
+                // Reset the iframe height to the final content height.
+                $scope.height = $scope.frame.dom.contentWindow.document.body.scrollHeight;
+
                 var page = iframe.contentWindow.location.href;
                 console.debug('egEmbedFrameLoader(): ' + page);