react-magma
react-magma copied to clipboard
Safari > Dropdowns won't close on second button click
Describe the bug
Safari doesn't close a Dropdown when using the Dropdown button. It remains on the screen after a second button click.
To Reproduce Steps to reproduce the behavior:
- In Safari, go to the doc site.
- Go to Dropdown.
- Click on any Dropdown button to open a Dropdown, then click again to close.
- Notice that the Dropdown remains open on the second click.
Expected behavior When a Dropdown button click opens a Dropdown, that same button should close the Dropdown when clicked again.
Desktop (please complete the following information):
- OS: Mac OS Ventura
- Safari
- Version 16
This comment describes the problem: https://github.com/downshift-js/downshift/issues/443#issuecomment-395227968
The problem seems to be that Safari on iOS triggers a blur event before the onClick event