From ac2e949c3ef1e73b19f3a8bdcd1575ed563311f0 Mon Sep 17 00:00:00 2001 From: John McLear Date: Fri, 24 Oct 2014 00:13:34 +0100 Subject: [PATCH] chrome browser change wrapping type --- src/static/js/ace2_inner.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index fb6dd0804..6a37ac7ab 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -152,7 +152,6 @@ function Ace2Inner(){ var dmesg = noop; window.dmesg = noop; - var scheduler = parent; // hack for opera required var textFace = 'monospace'; @@ -597,6 +596,13 @@ function Ace2Inner(){ fixView(); }); }, 0); + + // Chrome can't handle the truth.. If CSS rule white-space:pre-wrap + // is true then any paste event will insert two lines.. + if(browser.chrome){ + $("#innerdocbody").css({"white-space":"normal"}); + } + } function setStyled(newVal)