From 3ea34adfc1e7d94d59e52fb5fa5b704063940709 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sat, 11 Feb 2012 21:06:21 +0100 Subject: [PATCH] Fixes for IE7/8 to avoid problems with javascript on some screens. --- js/inserts.js | 2 +- js/utils.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/inserts.js b/js/inserts.js index e15da1e..0db3c71 100644 --- a/js/inserts.js +++ b/js/inserts.js @@ -508,7 +508,7 @@ function setHotKeys() { ev.returnValue = false; return false; } - if (editors && editors[key]) { + if (editors!=='undefined' && editors[key]) { callEditor(key); return stopEv(ev); // prevent default binding } diff --git a/js/utils.js b/js/utils.js index a801a13..cd41633 100644 --- a/js/utils.js +++ b/js/utils.js @@ -119,7 +119,7 @@ JsHttpRequest._request = function(trigger, form, tout, retry) { } else if(cmd=='fc') { // set focus _focus = data; } else if(cmd=='js') { // evaluate js code - eval(data); + setTimeout(function(){eval(data)}, 200); // timeout required by IE7/8 } else if(cmd=='rd') { // client-side redirection window.location = data; } else if(cmd=='pu') { // pop-up @@ -352,4 +352,4 @@ function element_pos(e) { // parentNode has style.display set to none if (parentNode != document.documentElement) return null; return res; -} \ No newline at end of file +} -- 2.30.2