diff --git a/src/static/css/iframe_editor.css b/src/static/css/iframe_editor.css index b7ece1e66..2824a10a0 100644 --- a/src/static/css/iframe_editor.css +++ b/src/static/css/iframe_editor.css @@ -113,7 +113,11 @@ body.doesWrap { word-wrap: break-word; /* fix for issue #1648 - firefox not wrapping long lines (without spaces) correctly */ } -body.doesWrap > div{ +.noprewrap{ + white-space: normal; +} + +body.doesWrap:not(.noprewrap) > div{ /* Related to #1766 */ white-space: pre-wrap; } diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 5ec0127bd..d3cc4fd3e 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -612,7 +612,7 @@ function Ace2Inner(){ // So this has to be set to pre-wrap ;( // We need to file a bug w/ the Chromium team. if(browser.chrome){ - $("#innerdocbody, body.doesWrap > div").css({"white-space":"pre-wrap"}); + $("#innerdocbody").addClass("noprewrap"); } }