diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-01-20 12:33:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-20 12:33:34 +0000 |
commit | 857d7be700a97c57496d86ccc8506f3573ed84f2 (patch) | |
tree | 8823c6c1837495297ce3eed91e433deb020b4a4b /src/shared | |
parent | 1f57547c0ab1dab1aa615e2b543067855719ab6f (diff) | |
parent | 9dacd3a9d3f66bce5c3f1a3c5f6a12b23ec0e1e5 (diff) |
Merge pull request #314 from ueokande/qa-0.9
QA 0.9
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) { |