Skip to content

Initial hidden state fix #208

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

Closed

Conversation

JeanRemiDelteil
Copy link
Contributor

Fix ResizeSensor when adding it to an element that is currently hidden,
even if it is hidden because one of its parent is hidden.

Also contain fixes for incorrect logic found when writing this fix.

The test demo highlight the issue of adding a ResizeSensor when the element is hidden (or a parent in the tree is hidden)
using 'var' in another function will declare a separate new variable, hence messing with the intended logic.
This is more elegant, and will not miss the exact moment when the element become visible,
it should not eat much CPU either than the Interval approach (though we should test this).
JeanRemiDelteil referenced this pull request Jan 10, 2018
…co).

Removed element tracking.
Dropped IE9 and lower support.
Fixed sensor bug with invisible elements.
Addet reset() method to ResizeSensor.
@movedoa
Copy link
Contributor

movedoa commented Jan 25, 2018

Will this get merged?
This a superior solution to the current one.

@marcj
Copy link
Owner

marcj commented Mar 1, 2018

Merged in #213

@marcj marcj closed this Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants