From 95c0aa1812eb0f70ade1dbcc5be0ebd96ae09431 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sat, 23 Jun 2012 17:22:48 +0100 Subject: [PATCH] No longer testing on document.all Not testing for document.all to determin browser type & version anymore Now actually testing for rules & pageX instead --- lib/coder.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;