Skip to content

Commit 955c413

Browse files
author
Helge Andersen
committed
Changed from offsetParent to parentElement. Use of offsetParent is a major performance degradation (in IE, any use of offsetParent, offsetWidth or offsetHeight should be used with extreme caution) , it causes document reflow/layout in the browser.
1 parent 2ad8f7f commit 955c413

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/core/services/ui-grid-util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ function getWidthOrHeight( elem, name, extra ) {
151151

152152
function getLineHeight(elm) {
153153
elm = angular.element(elm)[0];
154-
var parent = elm.offsetParent;
154+
var parent = elm.parentElement;
155155

156156
if (!parent) {
157157
parent = document.getElementsByTagName('body')[0];

0 commit comments

Comments
 (0)