diff options
author | John McLear <john@mclear.co.uk> | 2015-01-21 14:55:29 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2015-01-21 14:55:29 +0000 |
commit | f2891e3b8b3c1b0d34c729ba5c14dc4f291d5b7a (patch) | |
tree | b78de3f6e3d2a9b4aa392ff04bd1ae51d5d3d263 /src | |
parent | ce40cacafaf220e4c075daa79240dd0263aeaa5d (diff) | |
download | etherpad-lite-f2891e3b8b3c1b0d34c729ba5c14dc4f291d5b7a.zip |
working
Diffstat (limited to 'src')
-rw-r--r-- | src/static/js/ace2_inner.js | 14 | ||||
-rw-r--r-- | src/static/js/pad.js | 1 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index dd2f2b12..93739805 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -19,9 +19,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -var _, $, jQuery, plugins, Ace2Common, bowser; -bowser = require('./browser').browser; +var _, $, jQuery, plugins, Ace2Common; +var bowser = require('./browser').browser; if(bowser.msie){ // Honestly fuck IE royally. // Basically every hack we have since V11 causes a problem @@ -30,6 +30,7 @@ if(bowser.msie){ bowser.chrome = true; } } + Ace2Common = require('./ace2_common'); plugins = require('ep_etherpad-lite/static/js/pluginfw/client_plugins'); @@ -43,7 +44,6 @@ var isNodeText = Ace2Common.isNodeText, binarySearchInfinite = Ace2Common.binarySearchInfinite, htmlPrettyEscape = Ace2Common.htmlPrettyEscape, noop = Ace2Common.noop; - var hooks = require('./pluginfw/hooks'); function Ace2Inner(){ @@ -953,7 +953,7 @@ function Ace2Inner(){ showslinenumbers : function(value){ hasLineNumbers = !! value; // disable line numbers on mobile devices - // if (bowser.mobile) hasLineNumbers = false; + if (bowser.mobile) hasLineNumbers = false; setClassPresence(sideDiv, "sidedivhidden", !hasLineNumbers); fixView(); }, @@ -4657,17 +4657,17 @@ function Ace2Inner(){ for (var i = 0; i < 2; i++) { var newHeight = root.clientHeight; - var newWidth = root.clientWidth; + var newWidth = (browser.msie ? root.createTextRange().boundingWidth : root.clientWidth); var viewHeight = getInnerHeight() - iframePadBottom - iframePadTop; var viewWidth = getInnerWidth() - iframePadLeft - iframePadRight; if (newHeight < viewHeight) { newHeight = viewHeight; -// if (bowser.msie) setIfNecessary(outerWin.document.documentElement.style, 'overflowY', 'auto'); + if (bowser.msie) setIfNecessary(outerWin.document.documentElement.style, 'overflowY', 'auto'); } else { -// if (bowser.msie) setIfNecessary(outerWin.document.documentElement.style, 'overflowY', 'scroll'); + if (bowser.msie) setIfNecessary(outerWin.document.documentElement.style, 'overflowY', 'scroll'); } if (doesWrap) { diff --git a/src/static/js/pad.js b/src/static/js/pad.js index 685b420b..5bbf4123 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -494,7 +494,6 @@ var pad = { pad.initTime = +(new Date()); pad.padOptions = clientVars.initialOptions; -console.log("pad", browser); if ((!browser.msie) && (!(browser.firefox && browser.version.indexOf("1.8.") == 0))) { document.domain = document.domain; // for comet |