Skip to content

Commit

Permalink
Handle hidden overflow
Browse files Browse the repository at this point in the history
- This fixes #11
  • Loading branch information
Nicky Lenaers committed Jul 22, 2017
1 parent 5e2cb9c commit 9ccae5b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/scroll-to.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ export class ScrollToService {
// Skip Absolute Positioning
if (style.position === 'absolute') continue;

// Skip Hidden Overflow
if (style.overflow === 'hidden' || style.overflowY === 'hidden') continue;

// Return Body
if (parent.tagName === 'BODY') return parent;

Expand Down

0 comments on commit 9ccae5b

Please sign in to comment.