From dd49c71af998ad1d89a2cad7c52bbf1821b9ffaf Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 6 Feb 2013 19:43:28 +0000 Subject: [PATCH 1/3] fixes IE8 error by only redifining if firefox --- src/static/js/ace2_inner.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index d62b9f685..8c4beef5c 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -156,10 +156,13 @@ function Ace2Inner(){ // Ugly hack for Firefox 18 // get the timeout and interval methods from the parent iframe - setTimeout = parent.setTimeout; - clearTimeout = parent.clearTimeout; - setInterval = parent.setInterval; - clearInterval = parent.clearInterval; + var FIREFOX = /Firefox/i.test(navigator.userAgent); + if(FIREFOX){ + setTimeout = parent.setTimeout; + clearTimeout = parent.clearTimeout; + setInterval = parent.setInterval; + clearInterval = parent.clearInterval; + } var textFace = 'monospace'; var textSize = 12; From 9fcabfa8ac08cb9e8147998aecf80754d78093d9 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 6 Feb 2013 20:02:24 +0000 Subject: [PATCH 2/3] fix IE8 styling y u no do this 0ip? --- src/templates/index.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/templates/index.html b/src/templates/index.html index c3c13db32..4f6d500b9 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -64,7 +64,8 @@ box-shadow: 0px 1px 8px rgba(0,0,0,0.3); } #inner { - width: 300px; + position:relative; + max-width: 300px; margin: 0 auto; } #button { @@ -100,6 +101,10 @@ text-shadow: 0 1px 1px #fff; margin: 16px auto 0; } + #padname{ + height:38px; + max-width:280px; + } form { height: 38px; background: #fff; @@ -115,7 +120,8 @@ border-radius: 3px; box-sizing: border-box; -moz-box-sizing: border-box; - padding: 0 45px 0 10px; + line-height:36px; /* IE8 hack */ + padding: 0px 45px 0 10px; *padding: 0; /* IE7 hack */ width: 100%; height: 100%; @@ -125,7 +131,7 @@ } button[type="submit"] { position: absolute; - right: 0; + left:253px; width: 45px; height: 38px; } From adaded343dd9b58fa8912dbe8ccf162b6907c12e Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 6 Feb 2013 20:09:30 +0000 Subject: [PATCH 3/3] better fix for IE8 page up down --- src/static/js/ace2_inner.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 8c4beef5c..6d8c58bbc 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -156,12 +156,14 @@ function Ace2Inner(){ // Ugly hack for Firefox 18 // get the timeout and interval methods from the parent iframe - var FIREFOX = /Firefox/i.test(navigator.userAgent); - if(FIREFOX){ + // This hack breaks IE8 + try{ setTimeout = parent.setTimeout; clearTimeout = parent.clearTimeout; setInterval = parent.setInterval; clearInterval = parent.clearInterval; + }catch(err){ + // IE8 can panic here. } var textFace = 'monospace';