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

Not open first tab directly on mobile devices #157

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jengi77
Copy link

@jengi77 jengi77 commented Apr 14, 2020

When scrollToAccordion is set to true you jump directly to the open tab on mobile devices. So a check was added to only open the first tab when the actual device is not a mobile.

jengi77 added 2 commits April 14, 2020 14:58
When you are on a mobile device, you do not want the first tab to be open. When scrollToAccordion is set to true and the first tab is always open, you jump directly to the open tab, which is wrong.
@steinhaug
Copy link

Well, shouldn't the syntax here be:

} else if (!window.matchMedia('(max-width: 646px)').matches) {

you wrote:

} else (!window.matchMedia('(max-width: 646px)').matches) {

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