Topbar close button interactable when topbar menu is not open
Closed this issue · 1 comments
erikhallaraaker commented
Describe the bug
The close button is interactable even if topbar menu is closed and in "wide mode".
To Reproduce
Steps to reproduce the behavior:
- Go to https://design.swedbankpay.com/v/4.1.0/docs/components/topbar#topbar-wide
- Click on the close-button, it cannot be seen unless tabbed to
- Click it or press enter while it has focus
- See error
Expected behavior
Expected the button to be hidden and not interactable while menu is closed
Actual behavior
Button is interactable and "closes" the menu even if it is not open.
Possible fix
A possible fix would be to add a check if the topbar menu is open on the button's event handler before firing the close event.
Screenshots