This commit is contained in:
John McLear 2015-01-21 14:55:29 +00:00
parent ce40cacafa
commit f2891e3b8b
2 changed files with 7 additions and 8 deletions

View File

@ -19,9 +19,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
var _, $, jQuery, plugins, Ace2Common, bowser; var _, $, jQuery, plugins, Ace2Common;
bowser = require('./browser').browser;
var bowser = require('./browser').browser;
if(bowser.msie){ if(bowser.msie){
// Honestly fuck IE royally. // Honestly fuck IE royally.
// Basically every hack we have since V11 causes a problem // Basically every hack we have since V11 causes a problem
@ -30,6 +30,7 @@ if(bowser.msie){
bowser.chrome = true; bowser.chrome = true;
} }
} }
Ace2Common = require('./ace2_common'); Ace2Common = require('./ace2_common');
plugins = require('ep_etherpad-lite/static/js/pluginfw/client_plugins'); plugins = require('ep_etherpad-lite/static/js/pluginfw/client_plugins');
@ -43,7 +44,6 @@ var isNodeText = Ace2Common.isNodeText,
binarySearchInfinite = Ace2Common.binarySearchInfinite, binarySearchInfinite = Ace2Common.binarySearchInfinite,
htmlPrettyEscape = Ace2Common.htmlPrettyEscape, htmlPrettyEscape = Ace2Common.htmlPrettyEscape,
noop = Ace2Common.noop; noop = Ace2Common.noop;
var hooks = require('./pluginfw/hooks'); var hooks = require('./pluginfw/hooks');
function Ace2Inner(){ function Ace2Inner(){
@ -953,7 +953,7 @@ function Ace2Inner(){
showslinenumbers : function(value){ showslinenumbers : function(value){
hasLineNumbers = !! value; hasLineNumbers = !! value;
// disable line numbers on mobile devices // disable line numbers on mobile devices
// if (bowser.mobile) hasLineNumbers = false; if (bowser.mobile) hasLineNumbers = false;
setClassPresence(sideDiv, "sidedivhidden", !hasLineNumbers); setClassPresence(sideDiv, "sidedivhidden", !hasLineNumbers);
fixView(); fixView();
}, },
@ -4657,17 +4657,17 @@ function Ace2Inner(){
for (var i = 0; i < 2; i++) for (var i = 0; i < 2; i++)
{ {
var newHeight = root.clientHeight; var newHeight = root.clientHeight;
var newWidth = root.clientWidth; var newWidth = (browser.msie ? root.createTextRange().boundingWidth : root.clientWidth);
var viewHeight = getInnerHeight() - iframePadBottom - iframePadTop; var viewHeight = getInnerHeight() - iframePadBottom - iframePadTop;
var viewWidth = getInnerWidth() - iframePadLeft - iframePadRight; var viewWidth = getInnerWidth() - iframePadLeft - iframePadRight;
if (newHeight < viewHeight) if (newHeight < viewHeight)
{ {
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 else
{ {
// if (bowser.msie) setIfNecessary(outerWin.document.documentElement.style, 'overflowY', 'scroll'); if (bowser.msie) setIfNecessary(outerWin.document.documentElement.style, 'overflowY', 'scroll');
} }
if (doesWrap) if (doesWrap)
{ {

View File

@ -494,7 +494,6 @@ var pad = {
pad.initTime = +(new Date()); pad.initTime = +(new Date());
pad.padOptions = clientVars.initialOptions; pad.padOptions = clientVars.initialOptions;
console.log("pad", browser);
if ((!browser.msie) && (!(browser.firefox && browser.version.indexOf("1.8.") == 0))) if ((!browser.msie) && (!(browser.firefox && browser.version.indexOf("1.8.") == 0)))
{ {
document.domain = document.domain; // for comet document.domain = document.domain; // for comet