diff --git a/src/static/css/iframe_editor.css b/src/static/css/iframe_editor.css index eb69364bd..c32ae3f06 100644 --- a/src/static/css/iframe_editor.css +++ b/src/static/css/iframe_editor.css @@ -98,7 +98,18 @@ body.grayedout { background-color: #eee !important } } body.doesWrap { - white-space: pre-wrap; /*Must be pre-wrap to keep trailing spaces. Otherwise you get a zombie caret, walking around your screen (see #1766), WARNING: Enabling this causes Paste as plain text in Chrome to remove line breaks, this is probably undesirable */ + /* white-space: pre-wrap; */ + + /* + Must be pre-wrap to keep trailing spaces. Otherwise you get a zombie caret, + walking around your screen (see #1766). + WARNING: Enabling this causes Paste as plain text in Chrome to remove line breaks + this is probably undesirable + WARNING: This causes copy & paste events to lose bold etc. attributes + NOTE: The walking-zombie caret issue seems to have been fixed in FF upstream + so let's try diabling pre-wrap and see how we get on now. + For more details see: https://github.com/ether/etherpad-lite/issues/2574 + */ word-wrap: break-word; /* fix for issue #1648 - firefox not wrapping long lines (without spaces) correctly */ } diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 44bf2bed3..14ebc404d 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -608,8 +608,11 @@ function Ace2Inner(){ // Chrome can't handle the truth.. If CSS rule white-space:pre-wrap // is true then any paste event will insert two lines.. + // Sadly this will mean you get a walking Caret in Chrome when clicking on a URL + // So this has to be set to pre-wrap ;( + // We need to file a bug w/ the Chromium team. if(browser.chrome){ - $("#innerdocbody").css({"white-space":"normal"}); + $("#innerdocbody").css({"white-space":"pre-wrap"}); } }