diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-01-20 21:00:39 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-01-20 21:00:39 +0900 |
commit | 526009ba52f444df16975ea07e5e42598eeaa3d6 (patch) | |
tree | 5c938aa06c7172751591e58d621dc2aa9c5d71d2 /src/shared | |
parent | 3796b7de0d181d01747160d3b2082f78bb456b1e (diff) |
fix for slack scroll
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/utils/dom.js | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |