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

Slideshow previous button disabled fix #1032

Merged
merged 2 commits into from
Dec 16, 2021
Merged

Conversation

ludoboludo
Copy link
Contributor

@ludoboludo ludoboludo commented Dec 16, 2021

Why are these changes introduced?

Fixes an issue where the previous button on the slideshow is disabled. It doesn't come up when you first add the section in the editor but does once you've saved.

Didn't notice it before, so I'm wondering what could potentially have triggered it 🤔 Seems like an issue with the order in which functions/values are being called.

I think it's due to the fact that the slideshow component is extending the slider component and has a different value for this.enableSliderLooping. But when it runs update() it's using the false value set in sliderComponent first which disables the previous button and only after that it notices the different value set within the slideshow component.

What approach did you take?

I added a check in the update() within the slideshow component. So that if it sees the disabled attribute it removes it.

Other considerations

Demo links

Checklist

LucasLacerdaUX
LucasLacerdaUX previously approved these changes Dec 16, 2021
Copy link
Contributor

@LucasLacerdaUX LucasLacerdaUX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The solution works. I think we can get rid of the if, though :D

assets/global.js Outdated Show resolved Hide resolved
@ludoboludo ludoboludo merged commit 4306328 into main Dec 16, 2021
@ludoboludo ludoboludo deleted the slideshow-button-fix branch December 16, 2021 20:29
phapsidesGT pushed a commit to Gravytrain-UK/gt-shopify-dawn-theme that referenced this pull request Sep 3, 2024
* chck and make sure prev is disabled

* remove if statement
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