Browse Source

Fix visibility issue with onScreen calculations for long elements

pull/6268/head
Jack 7 years ago
parent
commit
b78dc75fc1
2 changed files with 2 additions and 1 deletions
  1. 1
      RELEASE-NOTES.md
  2. 2
      src/definitions/behaviors/visibility.js

1
RELEASE-NOTES.md

@ -5,6 +5,7 @@
**Bugs**
- **Icons** - Fixes some icons that were incorrectly named. **Thanks hammy2899** [#6181](https://github.com/Semantic-Org/Semantic-UI/pull/6181) [#6180](https://github.com/Semantic-Org/Semantic-UI/pull/6180) [#6176](https://github.com/Semantic-Org/Semantic-UI/pull/6176) [#6175](https://github.com/Semantic-Org/Semantic-UI/pull/6175)
- **Icons** - Increased specifity on `fitted icon` to fix compatibility with other components [#6125](https://github.com/Semantic-Org/Semantic-UI/issues/6125)
- **Visibility** - Fixed bug that could cause `onScreen` to not work properly for elements that are longer than screen.
**Docs**
- Fixes CDN links in docs **Thanks @KSH-code**

2
src/definitions/behaviors/visibility.js

@ -933,7 +933,7 @@ $.fn.visibility = function(parameters) {
element.percentagePassed = 0;
// meta calculations
element.onScreen = (element.topVisible && !element.bottomPassed);
element.onScreen = ((element.topVisible || element.passing) && !element.bottomPassed);
element.passing = (element.topPassed && !element.bottomPassed);
element.offScreen = (!element.onScreen);

Loading…
Cancel
Save