From adaded343dd9b58fa8912dbe8ccf162b6907c12e Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 6 Feb 2013 20:09:30 +0000 Subject: [PATCH] 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';