Skip to content

Commit

Permalink
use document as the scroll parent if the body is the scroll parent (#119
Browse files Browse the repository at this point in the history
)

closes #116
  • Loading branch information
tim-evans authored and acburdine committed Nov 18, 2016
1 parent 5d22389 commit a8406d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addon/system/scroll-parent.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export default function ($element) {
return /(auto|scroll)/.test(overflow + overflowX + overflowY);
}).eq(0);

if ($scrollParent.length === 0) {
if ($scrollParent.length === 0 ||
$scrollParent[0] === document.body) {
$scrollParent = $(document);
}
return position === 'fixed' || $scrollParent;
Expand Down

0 comments on commit a8406d7

Please sign in to comment.