From ab71bc7c205e6944fcdc46b09cb8e603c433540e Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 19 Jan 2015 14:45:49 +0000 Subject: [PATCH 1/2] hrm --- src/static/js/ace2_inner.js | 7 +++++-- src/static/js/contentcollector.js | 2 -- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index bd1f0053f..ebc03ca4f 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -1605,7 +1605,7 @@ function Ace2Inner(){ if (linesWrapped > 0) { - if(!browser.ie){ + if(!browser.msie){ // chrome decides in it's infinite wisdom that its okay to put the browsers visisble window in the middle of the span // an outcome of this is that the first chars of the string are no longer visible to the user.. Yay chrome.. // Move the browsers visible area to the left hand side of the span @@ -2905,6 +2905,7 @@ function Ace2Inner(){ { if (browser.msie && (!nonEmpty)) { +top.console.log("here"); var result = { node: null, appendSpan: noop, @@ -3583,6 +3584,7 @@ function Ace2Inner(){ // On Mac and Linux, move right moves to end of word and move left moves to start; // on Windows, always move to start of word. // On Windows, Firefox and IE disagree on whether to stop for punctuation (FF says no). + /* if (browser.windows && forwardNotBack) { while ((!isDone()) && isWordChar(nextChar())) @@ -3605,6 +3607,7 @@ function Ace2Inner(){ advance(); } } + */ return i; } @@ -4867,7 +4870,7 @@ function Ace2Inner(){ }) // CompositionEvent is not implemented below IE version 8 - if ( !(browser.msie && browser.version < 9) && document.documentElement) + if ( !(browser.msie && parseInt(browser.version) < 9) && document.documentElement) { $(document.documentElement).on("compositionstart", handleCompositionEvent); $(document.documentElement).on("compositionend", handleCompositionEvent); diff --git a/src/static/js/contentcollector.js b/src/static/js/contentcollector.js index b7b3c568b..1759d8656 100644 --- a/src/static/js/contentcollector.js +++ b/src/static/js/contentcollector.js @@ -625,13 +625,11 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class _ensureColumnZero(state); } } - if (browser.msie) { // in IE, a point immediately after a DIV appears on the next line _reachBlockPoint(node, 1, state); } - state.localAttribs = localAttribs; }; // can pass a falsy value for end of doc From c315defc3124b44e9c5300e93952f124f7e1d82f Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 19 Jan 2015 15:15:52 +0000 Subject: [PATCH 2/2] temp bodge fix --- src/static/js/ace2_inner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index ebc03ca4f..5204e2a19 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -1910,6 +1910,7 @@ function Ace2Inner(){ if (charsLeft === 0) { var index = 0; + browser.msie = false; // Temp fix to resolve enter and backspace issues.. if (browser.msie && line == (rep.lines.length() - 1) && lineNode.childNodes.length === 0) { // best to stay at end of last empty div in IE @@ -2905,7 +2906,6 @@ function Ace2Inner(){ { if (browser.msie && (!nonEmpty)) { -top.console.log("here"); var result = { node: null, appendSpan: noop,