w3c / aria-at-app

Test runner and results reporter for ARIA-AT
http://aria-at.w3.org/
Other
35 stars 15 forks source link

fix: onHide error thrown on `ESC` press when `<UpdateVersionModal />` is open #1160

Closed howard-e closed 1 month ago

howard-e commented 1 month ago

I was opening the Manage Assistive Technology Versions disclosure on the Test Queue page to add/edit AT verions. Found that if I hit ESC on my keyboard to close either modals, an error is thrown which reads onHide is not a function where the stacktrace points to a line inside react-bootstrap's Modal component. Screenshot:

Screenshot showing onHide error

I confirmed this doesn't happen on production so my only guess is this error was introduced in #1148 when react-bootstrap was bumped from 2.7.0 to 2.10.4. Although, nothing obvious jumps out at me when viewing the release notes.

This PR should restore the functionality that's on production (although I'm also wondering if the title refocus instead of closing the modal is intentional).