Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tnicola committed Aug 13, 2018
2 parents f91a776 + 9f3f79f commit d853e4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/src/directives/joyride.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ export class JoyrideDirective implements AfterViewInit {
}

private isAncestorsFixed(nativeElement: any): boolean {
if(!nativeElement.parentElement) return false;
let isElementFixed = window.getComputedStyle(nativeElement.parentElement).position === 'fixed';
if (nativeElement.nodeName === 'BODY') {
if (isElementFixed) return true;
else return false;
return isElementFixed;
}
if (isElementFixed) return true;
else return this.isAncestorsFixed(nativeElement.parentElement);
Expand Down

0 comments on commit d853e4f

Please sign in to comment.