-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for issue/1873 #2268
Fix for issue/1873 #2268
Conversation
src/core/js/libraries/inview.js
Outdated
if (cssHidden) return true; | ||
|
||
var style = window.getComputedStyle(element, null); | ||
cssHidden = (style.display == "none" || style.visibility == "hidden"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good opportunity to switch to strict equality checks here and on L570?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to retain compatibility with IE8.
@tomgreenfield sorry thought the last two commits on master to inview had removed IE8 support. Should have tested it... which I have now done ;-) |
src/core/js/libraries/inview.js
Outdated
@@ -570,8 +570,7 @@ | |||
var cssHidden = (element.style.display == "none" || element.style.visibility == "hidden"); | |||
if (cssHidden) return true; | |||
|
|||
var style = window.getComputedStyle(element, null); | |||
cssHidden = (style.display == "none" || style.visibility == "hidden"); | |||
cssHidden = $(element).css("display") === "none" || $(element).css("visibility") === "hidden"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worth caching $(element)
? or am I just being too picky?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👁
#1873