diff --git a/lib/coder.js b/lib/coder.js index d7135f0..b5940ba 100644 --- a/lib/coder.js +++ b/lib/coder.js @@ -1155,16 +1155,19 @@ var ICEcoder = { // Test if we need to show a drag cursor or not dragCursorTest: function() { - var winH; + var winH, cursorName; if (top.ICEcoder.ready) { window.innerWidth ? winH = window.innerHeight : winH = document.body.clientHeight; if (!top.ICEcoder.mouseDown) {top.ICEcoder.draggingFilesW = false}; if ((top.ICEcoder.mouseX > top.ICEcoder.filesW-7 && top.ICEcoder.mouseX < top.ICEcoder.filesW+7 && top.ICEcoder.mouseY > 40 && top.ICEcoder.mouseY < (winH-30)) || top.ICEcoder.draggingFilesW) { - top.document.body.style.cursor = top.ICEcoder.content.contentWindow.document.body.style.cursor = top.ICEcoder.filesFrame.contentWindow.document.body.style.cursor = "w-resize"; + cursorName = "w-resize"; } else { - top.document.body.style.cursor = top.ICEcoder.content.contentWindow.document.body.style.cursor = top.ICEcoder.filesFrame.contentWindow.document.body.style.cursor = "auto"; + cursorName = "auto"; + } + if (top.ICEcoder.content.contentWindow.document && top.ICEcoder.filesFrame.contentWindow) { + top.document.body.style.cursor = top.ICEcoder.content.contentWindow.document.body.style.cursor = top.ICEcoder.filesFrame.contentWindow.document.body.style.cursor = cursorName; } } }, @@ -1584,7 +1587,7 @@ var ICEcoder = { unitText = "kb"; // Maybe we should show in megabytes? if (unitSize >= 1024) { - unitSize = unitSize / 1024; + unitSize = (unitSize / 1024).toFixed(2); unitText = "mb"; } // Update the display