From 526009ba52f444df16975ea07e5e42598eeaa3d6 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sat, 20 Jan 2018 21:00:39 +0900 Subject: fix for slack scroll --- src/shared/utils/dom.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/shared') diff --git a/src/shared/utils/dom.js b/src/shared/utils/dom.js index f138c33..974d534 100644 --- a/src/shared/utils/dom.js +++ b/src/shared/utils/dom.js @@ -83,7 +83,9 @@ const viewportRect = (e) => { const isVisible = (element) => { let rect = element.getBoundingClientRect(); - if (rect.width === 0 || rect.height === 0) { + let style = window.getComputedStyle(element); + + if (style.overflow !== 'visible' && (rect.width === 0 || rect.height === 0)) { return false; } if (rect.right < 0 && rect.bottom < 0) { -- cgit v1.2.3