Skip to content

Commit

Permalink
Merge pull request #1 from ChangJin0520/ChangJin0520-patch-1
Browse files Browse the repository at this point in the history
fix: fix 'HTMLElement undefined' error (zTree#425)
  • Loading branch information
ChangJin0520 authored Nov 5, 2019
2 parents 6fdf459 + bb4be99 commit e22a14a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/jquery.ztree.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1429,8 +1429,8 @@
if (!dom) {
return;
}
// support IE 7
if (typeof Element === 'undefined') {
// support IE 7/8
if (typeof Element === 'undefined' || typeof HTMLElement === 'undefined') {
var contRect = setting.treeObj.get(0).getBoundingClientRect(),
findMeRect = dom.getBoundingClientRect();
if (findMeRect.top < contRect.top || findMeRect.bottom > contRect.bottom
Expand Down Expand Up @@ -1982,4 +1982,4 @@
var zt = $.fn.zTree,
$$ = tools.$,
consts = zt.consts;
})(jQuery);
})(jQuery);

0 comments on commit e22a14a

Please sign in to comment.