fluid-lab / gamepad-navigator

GSoC 2020 project
Other
6 stars 10 forks source link

Focus remains on (hidden) modal element after close. #180

Open duhrer opened 4 months ago

duhrer commented 4 months ago

In testing with Weavly, I can consistently get into a state where the optional focus indicator remains in the position of the last focused element within the modal, even after the modal closes.

I notice that the the last focused element does not receive focus either. So we have two problems:

  1. There always needs to be a blur to clear the focus indicator in the modal, whether or not anything is focused in the rest of the page.
  2. Whenever possible, focus should be restored when closing a modal.

The current steps I'm using to reproduce this are:

  1. Open Weavly.
  2. Create a program with a loop iterator and steps inside the loop.
  3. Edit the number of iterations with the number helper.
  4. Save the updated value using the "Update Field" button.
  5. Hilarity ensues.

Screenshot 2024-02-29 at 11 35 28