cengage / react-magma

https://react-magma.cengage.com
MIT License
21 stars 12 forks source link

Safari > Dropdowns won't close on second button click #1142

Open chris-cedrone-cengage opened 11 months ago

chris-cedrone-cengage commented 11 months ago

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:

  1. In Safari, go to the doc site.
  2. Go to Dropdown.
  3. Click on any Dropdown button to open a Dropdown, then click again to close.
  4. 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):

Notes

silvalaura commented 4 months ago

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