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

Toggled menu closes on screen size change #12077

Closed
3 tasks done
dgobnto opened this issue May 16, 2020 · 4 comments
Closed
3 tasks done

Toggled menu closes on screen size change #12077

dgobnto opened this issue May 16, 2020 · 4 comments

Comments

@dgobnto
Copy link

dgobnto commented May 16, 2020

What should happen?

A toggled menu should stay open after a screen size change.

What happens instead?

Menu closes.

Possible Solution

...

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

Test Case: https://codepen.io/koiastudio/pen/QWjZQBW

How to reproduce:

  1. Resize screen to 'small' screen size;
  2. Toggle the menu;
  3. Change screen size to 'medium'.

Context

One consequence is that the aria-expanded value on the element that triggers the toggle remains true, although the menu is now closed.

Your Environment

  • Foundation version(s) used: 6.6.3
  • Browser(s) name and version(s): All modern browsers
  • Device, Operating System and version: macOS 10.13
  • Link to your project:

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.
@DanielRuf
Copy link
Contributor

@DanielRuf
Copy link
Contributor

So far it makes sense to me.

@dgobnto
Copy link
Author

dgobnto commented May 17, 2020

I understand that the operation is in accordance with the code instructions (it always is, right?!), but I just don't think that this is the desired behavior. Why should the menu close on screen size change?
On a second note, as mentioned already, at the moment the values of 'aria-expanded' or the toggled class are not updated. This causes a number of issues, namely it becomes impossible to animate the button based on those attributes.

@DanielRuf
Copy link
Contributor

DanielRuf commented May 17, 2020

PRs which fix this are very welcome.
We have to check in detail what has to be changed to get a good working solution.

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

No branches or pull requests

3 participants