From b873cfc26d791767c9a16ab29e507b2192d0c11f Mon Sep 17 00:00:00 2001 From: Waheed Ahmed Date: Tue, 6 May 2014 20:35:38 +0500 Subject: [PATCH] Fixed simple editor text showing in advanced editor. --- cms/static/js/views/modals/edit_xblock.js | 8 +++----- common/lib/xmodule/xmodule/js/src/problem/edit.coffee | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cms/static/js/views/modals/edit_xblock.js b/cms/static/js/views/modals/edit_xblock.js index 0e5e83fbef..f217d7c979 100644 --- a/cms/static/js/views/modals/edit_xblock.js +++ b/cms/static/js/views/modals/edit_xblock.js @@ -136,11 +136,9 @@ define(["jquery", "underscore", "gettext", "js/views/modals/base_modal", mode = parent.data('mode'); event.preventDefault(); var $cheatsheet = $('.simple-editor-cheatsheet'); - if ($cheatsheet.hasClass("shown")) { - $(".CodeMirror").removeAttr("style"); - $(".modal-content").removeAttr("style"); - $cheatsheet.removeClass('shown'); - } + $(".CodeMirror").css({"overflow": "none"}); + $(".modal-content").removeAttr("style"); + $cheatsheet.removeClass('shown'); this.selectMode(mode); }, diff --git a/common/lib/xmodule/xmodule/js/src/problem/edit.coffee b/common/lib/xmodule/xmodule/js/src/problem/edit.coffee index ee318ecdb7..30d448dd65 100644 --- a/common/lib/xmodule/xmodule/js/src/problem/edit.coffee +++ b/common/lib/xmodule/xmodule/js/src/problem/edit.coffee @@ -109,7 +109,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor $(".CodeMirror").css({"overflow": "visible"}) $(".modal-content").css({"overflow-y": "visible", "overflow-x": "visible"}) else - $(".CodeMirror").removeAttr("style") + $(".CodeMirror").css({"overflow": "none"}) $(".modal-content").removeAttr("style") ###