From a8406d727d37e696c1e03936a72fb3f305e20c91 Mon Sep 17 00:00:00 2001 From: Tim Evans Date: Fri, 18 Nov 2016 18:34:26 -0500 Subject: [PATCH] use document as the scroll parent if the body is the scroll parent (#119) closes #116 --- addon/system/scroll-parent.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addon/system/scroll-parent.js b/addon/system/scroll-parent.js index 17297ab0..4eaa6471 100644 --- a/addon/system/scroll-parent.js +++ b/addon/system/scroll-parent.js @@ -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;