Browse Source

AMBARI-8491. Views in Ambari 'jump' upon screen refresh. (akovalenko)

Aleksandr Kovalenko 10 years ago
parent
commit
fc2c0ba907
1 changed files with 2 additions and 0 deletions
  1. 2 0
      ambari-web/app/views/main/views/details.js

+ 2 - 0
ambari-web/app/views/main/views/details.js

@@ -68,6 +68,7 @@ App.MainViewsDetailsView = Em.View.extend({
     if (iframe != null && iframe.length > 0) {
       var childrenHeight = 0;
       var iframeElement = iframe[0];
+      var pageScrollTop = $(window).scrollTop();
       // set iframe height to 'auto' to get actual scrollHeight
       iframeElement.style.height = 'auto';
       if (iframeElement.contentWindow != null
@@ -80,6 +81,7 @@ App.MainViewsDetailsView = Em.View.extend({
       var iFrameHeight = Math.max(childrenHeight, defaultHeight);
       console.debug("IFrame final height = ", iFrameHeight);
       iframe.css('height', iFrameHeight);
+      $(window).scrollTop(pageScrollTop);
     }
   },