From befd331687fbbc0f66867ace3708f17b33ed20ee Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Sat, 5 May 2018 23:19:42 +0200 Subject: [PATCH] minor fixes --- js/modules/Resizer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/modules/Resizer.js b/js/modules/Resizer.js index d5680a4..95e7b59 100644 --- a/js/modules/Resizer.js +++ b/js/modules/Resizer.js @@ -377,7 +377,8 @@ var _res_antiCssOverride = function(){ styleArray[i] = styleArray[i].trim(); if (styleArray[i].startsWith("top:")){ - if(styleArray[i] != GlobalVars.currentCss.top){ + // don't force css restore if currentCss.top is not defined + if(GlobalVars.currentCss.top && styleArray[i] != GlobalVars.currentCss.top){ if(Debug.debug){ console.log("[Resizer::_res_antiCssOverride] SOMEBODY TOUCHED MA SPAGHETT (our CSS got overriden, restoring our css)"); console.log("[Resizer::_res_antiCssOverride] MA SPAGHETT: top:", GlobalVars.currentCss.top, "left:", GlobalVars.currentCss.left, "thing that touched ma spaghett", styleArrayStr); @@ -388,7 +389,8 @@ var _res_antiCssOverride = function(){ stuffChecked++; } else if(styleArray[i].startsWith("left:")){ - if(styleArray[i] != GlobalVars.currentCss.left){ + // don't force css restore if currentCss.left is not defined + if(GlobalVars.currentCss.left && styleArray[i] != GlobalVars.currentCss.left){ if(Debug.debug){ console.log("[Resizer::_res_antiCssOverride] SOMEBODY TOUCHED MA SPAGHETT (our CSS got overriden, restoring our css)"); console.log("[Resizer::_res_antiCssOverride] MA SPAGHETT: width:", GlobalVars.currentCss.width, "height:", GlobalVars.currentCss.height, "thing that touched ma spaghett", styleArrayStr);