Skip to content

Commit 288a949

Browse files
committed
Focus element positioning fix for elements inside ng-include
1 parent a5c6e23 commit 288a949

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ng-walkthrough.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,8 @@ angular.module('ng-walkthrough', [])
383383
} else {
384384
width = focusElement[0].offsetWidth;
385385
height = focusElement[0].offsetHeight;
386-
left = focusElement[0].offsetLeft;
387-
top = focusElement[0].offsetTop;
386+
left = focusElement[0].getBoundingClientRect().left;
387+
top = focusElement[0].getBoundingClientRect().top;
388388
//var parent = focusElement[0].offsetParent;
389389

390390
//while (parent) {

0 commit comments

Comments
 (0)