From 7ac22033194d75487c9cca73668c16d3fc831ae6 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 13 Jan 2010 00:00:01 +0000 Subject: [PATCH] BUGFIX: Don't cut off document.body overflow in CTF popups in the admin, when on test mode. (from r88958) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@96790 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- javascript/LeftAndMain.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/javascript/LeftAndMain.js b/javascript/LeftAndMain.js index 0f9ac0fb..a71ca9a2 100644 --- a/javascript/LeftAndMain.js +++ b/javascript/LeftAndMain.js @@ -213,8 +213,12 @@ window.onresize = function(init) { } appendLoader(function() { - document.body.style.overflow = 'hidden'; - window.onresize(true); + // Only execute this code if it's actually called from the LeftAndMain interface + // JSMin/concatenation can get this file included in strange places + if(document.getElementById('left') && document.getElementById('right')) { + document.body.style.overflow = 'hidden'; + window.onresize(true); + } }); function isVisible(el) {