Skip to content
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

Filter children to slides only when determining number of slides #708

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

diazruy
Copy link

@diazruy diazruy commented Nov 20, 2014

When using MVC frameworks (Ember) to generate the HTML, additional
<script> nodes are inserted inside the .slide-group element. These extra nodes get
returned by slider.children, causing an incorrect number of slides to
be calculated, and hence when scrolling to the end of the slides, you
scroll into nothingness.

When using MVC frameworks (Ember) to generate the HTML, additional
`<script>` nodes are inserted inside the `.slide-group` element. These
extra nodes get returned by `slider.children`, causing an incorrect
number of slides to be calculated, and hence when scrolling to the end
of the slides, you scroll into nothingness.

This patch counts only the `.slide` nodes within the slider to get the
correct slide count.
@cvrebert
Copy link
Contributor

Sidenote: You should upgrade to Ember 1.8 where those wacky metamorphs are gone.

@cvrebert cvrebert added the js label Nov 21, 2014
@diazruy
Copy link
Author

diazruy commented Nov 21, 2014

That's the plan, but unfortunately at the moment we're on 1.6.0.beta2 and even just upgrading to 1.6 stable breaks things. We're on a bit of a time-crunch, so we're just pushing forward as is for now. Nice to know that 1.8 removes those, because I found them quite annoying.

@XhmikosR
Copy link
Member

/CC @connors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants