Skip to content

Improved detecting whether container is window#306

Open
a-t wants to merge 1 commit intosroze:masterfrom
a-t:patch-1
Open

Improved detecting whether container is window#306
a-t wants to merge 1 commit intosroze:masterfrom
a-t:patch-1

Conversation

@a-t
Copy link
Copy Markdown

@a-t a-t commented Aug 10, 2016

It's impossible now to change container back to window from external code via infinite-scroll-container attribute. This fixes the issue.
Here is a use case example: one has a responsive web page, and wants infinite scroll bind to window at low resolution but bind to an HTML element at high resolution. There should be a way to switch between these two containers dynamically on window resize.

It's impossible now to change container back to `window` from external code. This fixes the issue. Here is a use case example: one has a responsive web page, and wants infinite scroll bind to window at low resolution but bind to an HTML element at high resolution. There should be a way to switch between these two containers dynamically on window resize.
@graingert
Copy link
Copy Markdown
Collaborator

@a-t please include a test for this change

@a-t
Copy link
Copy Markdown
Author

a-t commented Aug 10, 2016

I'm sorry, but I don't quite understand what should be tested.

@graingert
Copy link
Copy Markdown
Collaborator

@a-t create a test that reproduces the bug, then show that the test passes when you make your change

@a-t
Copy link
Copy Markdown
Author

a-t commented Aug 10, 2016

I'm afraid it won't be easy as I'm not familiar with CoffeeScript :(

@graingert
Copy link
Copy Markdown
Collaborator

@a-t the tests are in ES2016 now

@graingert graingert force-pushed the master branch 2 times, most recently from 21036ac to 79473ca Compare October 10, 2016 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants