From 9002196c494c2bf8a041e0d767e320d965274a3c Mon Sep 17 00:00:00 2001 From: resurtm Date: Mon, 27 May 2013 21:34:14 +0600 Subject: [PATCH] MSIE fix. --- framework/yii/views/errorHandler/main.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/yii/views/errorHandler/main.php b/framework/yii/views/errorHandler/main.php index 94e6332..91b7bac 100644 --- a/framework/yii/views/errorHandler/main.php +++ b/framework/yii/views/errorHandler/main.php @@ -446,12 +446,15 @@ window.onload = function() { }; var refreshCallStackItemCode = function(callStackItem) { - var top = callStackItem.offsetTop - window.scrollY, + var top = callStackItem.offsetTop - window.pageYOffset, lines = Sizzle('pre', callStackItem)[0].getClientRects(), lineNumbers = Sizzle('.lines-item', callStackItem), errorLine = Sizzle('.error-line', callStackItem)[0], hoverLines = Sizzle('.hover-line', callStackItem); for (var i = 0, imax = lines.length; i < imax; ++i) { + if (!lineNumbers[i]) { + continue; + } lineNumbers[i].style.top = parseInt(lines[i].top - top) + 'px'; hoverLines[i].style.top = parseInt(lines[i].top - top) + 'px'; hoverLines[i].style.height = parseInt(lines[i].bottom - lines[i].top) + 'px';