diff --git a/services/web/app/views/project/editor.pug b/services/web/app/views/project/editor.pug index 1e77cf22b3..bce1a8c785 100644 --- a/services/web/app/views/project/editor.pug +++ b/services/web/app/views/project/editor.pug @@ -151,7 +151,7 @@ block content ) | {{showFileContents ? "Hide" : "Show"}} Local File Contents .text-preview(ng-show="showFileContents") - .scroll-container + textarea.scroll-container(readonly="readonly" rows="{{editorContentRows}}") | {{editorContent}} .modal-footer diff --git a/services/web/frontend/js/ide/services/ide.js b/services/web/frontend/js/ide/services/ide.js index 9a5f08698b..ca77175dea 100644 --- a/services/web/frontend/js/ide/services/ide.js +++ b/services/web/frontend/js/ide/services/ide.js @@ -162,6 +162,7 @@ App.controller('OutOfSyncModalController', function( $scope.title = title $scope.message = message $scope.editorContent = editorContent + $scope.editorContentRows = editorContent.split('\n').length $scope.done = () => { // Reload the page to avoid staying in an inconsistent state. diff --git a/services/web/frontend/stylesheets/app/editor.less b/services/web/frontend/stylesheets/app/editor.less index d5d855e4e6..bd01e4a71e 100644 --- a/services/web/frontend/stylesheets/app/editor.less +++ b/services/web/frontend/stylesheets/app/editor.less @@ -494,6 +494,7 @@ CodeMirror margin-top: @line-height-computed / 2; .scroll-container { max-height: 360px; + width: 100%; background-color: white; font-size: 0.8em; line-height: 1.1em;