Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Regression: Accordion scrolls to first anchor even if no deeplink was supplied #11527

Closed
3 tasks done
jnns opened this issue Oct 8, 2018 · 2 comments · Fixed by #11530
Closed
3 tasks done

Regression: Accordion scrolls to first anchor even if no deeplink was supplied #11527

jnns opened this issue Oct 8, 2018 · 2 comments · Fixed by #11530

Comments

@jnns
Copy link
Contributor

jnns commented Oct 8, 2018

What should happen?

When an accordion is created with data-deep-link=true data-deep-link-smudge and no deep link is supplied, there should not be any automatic scrolling.

What happens instead?

The active tab is scrolled into view even though no deep link has been supplied.

Possible Solution

It seems to me that this bug has been introduced by #11477 while fixing the return to the initial state. After this fix Foundation goes to the initial tab on page load but this hasn't been the case before.

Test Case and/or Steps to Reproduce (for bugs)

It wasn't possible for me to create a codepen because the URL hashes seem to not get passed down to the sandbox that the code examples are running in. Still, you can go to Foundation's current Accordion documentation pages (note that there's no deep link [i.e. hash]) and see that a scrolling animation is triggered for every accordion on that page.

A minimal working example can be obtained here.

Context

We're using Accordions to display a table of content at the bottom of our index page and since 6.5.0-rc3 the viewport is automatically scrolled down to the accordion, hiding the header of the page.

Checklist

  • I have read and follow the CONTRIBUTING.md document.
  • There are no other issues similar to this one.
  • The issue title and template are correctly filled.
@ncoden
Copy link
Contributor

ncoden commented Oct 9, 2018

Hi @jnns 👋,

Thank you for your issue. I noticed that we have the same bug on the Tabs page. This definitely comes from #11477. I'll take a look at it.

@ncoden ncoden self-assigned this Oct 9, 2018
ncoden added a commit to ncoden/foundation-sites that referenced this issue Oct 9, 2018
ncoden added a commit to ncoden/foundation-sites that referenced this issue Oct 9, 2018
ncoden added a commit to ncoden/foundation-sites that referenced this issue Oct 9, 2018
@ncoden
Copy link
Contributor

ncoden commented Oct 9, 2018

@jnns See #11530.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants