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

wrong extend order in refresh function #1376

Merged
merged 2 commits into from
May 25, 2015
Merged

Conversation

janrode
Copy link
Contributor

@janrode janrode commented May 21, 2015

refresh function: wrong extend order for current settings _ and _.initials.

this will break settings like initialSlide in combination with responsive.
in this case the initialSlide property will be overwritten by _.initials.initialSlide which is always 0.

refresh function: wrong extend order for current settings _ and _.initials.

this will break settings like initialSlide in combination with responsive.
in this case the initialSlide property will be overwritten by _.initials.initialSlide which is always 0.
@simeydotme
Copy link
Collaborator

Jan, can you produce a JSFiddle to demonstrate the error using the example JSfiddle provided in the contribution guidelines... Also can you demonstrate it being fixed after with your patch... And can you provide some edge cases, like asNavFor and addSlide and setOption.

Thanks.

@janrode
Copy link
Contributor Author

janrode commented May 25, 2015

Hi,

@simeydotme
Copy link
Collaborator

Thanks a ton for creating those fiddles!! :)
You have found a bug, but your patch is incorrect 😢 -- actually what is happening is the currentSlide is being reset wrongly... the initialSlide is maintaining it's integrity correctly, but it is not being used upon breakpoint, as when we hit a breakpoint we want to use the currentSlide, not the initialSlide. :)

please change your code to:

$.extend(_, _.initials, { currentSlide: currentSlide });

and I will accept the PR :)

@janrode
Copy link
Contributor Author

janrode commented May 25, 2015

Thank you for your assistance!
Bugfix is committed! Hopefully correct, this time :)

@simeydotme
Copy link
Collaborator

Ya, no need to worry, Slick is a big thing, so gotta be really focussed on what you may affect with changing code :) -- theres a hundred options to consider and how they interact with each property! 😄

simeydotme added a commit that referenced this pull request May 25, 2015
Current Slide was being replaced with the initial value upon responsive breakpoint at initialization.
@simeydotme simeydotme merged commit 31f87c6 into kenwheeler:master May 25, 2015
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.

2 participants