diff --git a/lib/coder.js b/lib/coder.js index 5dece25..b3623d4 100644 --- a/lib/coder.js +++ b/lib/coder.js @@ -85,8 +85,8 @@ var ICEcoder = { ICEcoder.content.style.height = (winH-headerH-footerH-tabsBarH-findBarH) + "px"; // Resize the CodeMirror instances to match the window size - document.all ? strCSS = 'rules' : strCSS = 'cssRules'; cMCSS = ICEcoder.content.contentWindow.document; + cMCSS.styleSheets[2].rules ? strCSS = 'rules' : strCSS = 'cssRules'; cMCSS.styleSheets[2][strCSS][1].style['width'] = ICEcoder.content.style.width; cMCSS.styleSheets[2][strCSS][1].style['height'] = ICEcoder.content.style.height; cMCSS.styleSheets[2][strCSS][2].style['width'] = ICEcoder.content.style.width; @@ -1119,7 +1119,7 @@ var ICEcoder = { getMouseXY: function(e) { var tempX, tempY, scrollTop, IE; - IE = document.all ? true : false; + IE = !e.pageX ? true : false; if (IE) { top.ICEcoder.mouseX = e.clientX + document.body.scrollLeft; top.ICEcoder.mouseY = e.clientY + document.body.scrollTop; @@ -1517,8 +1517,8 @@ var ICEcoder = { } // Show visible tabs or not - document.all ? strCSS = 'rules' : strCSS = 'cssRules'; cMCSS = ICEcoder.content.contentWindow.document; + cMCSS.styleSheets[2].rules ? strCSS = 'rules' : strCSS = 'cssRules'; visibleTabs ? cMCSS.styleSheets[2][strCSS][5].style['content'] = '"\\21e5"' : cMCSS.styleSheets[2][strCSS][5].style['content'] = '" "'; top.tabWidth = tabWidth;