Skip to content

Commit

Permalink
Fix scrollbar on firefox file viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
pablotr9 committed Aug 5, 2019
1 parent d38d088 commit df4e8f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/directives/wz-config-viewer/wz-config-viewer.html
Expand Up @@ -20,7 +20,7 @@
<md-divider class="wz-margin-top-10"></md-divider>
</div>
<!-- The JSON viewer -->
<div class='wzJsonXmlEditorBody'>
<div class='wzXmlEditorBody'>
<textarea id='viewer_json_box'></textarea>
</div>
<!-- End JSON viewer -->
Expand Down Expand Up @@ -52,7 +52,7 @@
<span>Viewing <b>{{noLocal}}</b> file</span>
</div>
<!-- The XML viewer -->
<div class='wzJsonXmlEditorBody'>
<div class='wzXmlEditorBody'>
<textarea id='viewer_xml_box'></textarea>
</div>
<!-- End XML viewer -->
Expand Down
3 changes: 3 additions & 0 deletions public/directives/wz-config-viewer/wz-config-viewer.js
Expand Up @@ -79,7 +79,10 @@ class WzConfigViewer {
const windows = $(window).height();
const offsetTop = getPosition(editorContainer[0]).y;
const bottom = $scope.isLogs ? 75 : 20;
const headerContainer = $('.wzXmlEditorHeader')
const headerContainerHeight = headerContainer.height() + 30 ? headerContainer.height() + 30 : 80;
editorContainer.height(windows - (offsetTop + bottom));
$('.wzXmlEditorBody .CodeMirror').height(windows - (offsetTop + bottom + headerContainerHeight));
}, 1);
};

Expand Down

0 comments on commit df4e8f9

Please sign in to comment.