joshwnj / joshwnj/react-visibility-sensor

support for style.display check

Open
#58 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.3k
Forks
192
PR merge metrics
No merged PRs in 30d

Description

Hello.

`onChange` reports `isVisible === true` even though this DOM display style is `none`.
Would you consider supporting the check of the `display` style?

```
// visibility-sensor.js
if(this.props.displayCheck) {
var elStyle = window.getComputedStyle(el);
isVisible = isVisible && elStyle.display !== 'none';
}
```

```

Testing Div

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.