Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

howard-e
Copy link
Contributor

@howard-e howard-e commented Jul 17, 2024

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).

@howard-e howard-e requested a review from stalgiag July 17, 2024 20:02
Copy link
Contributor

@stalgiag stalgiag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odd! If that is true then there might be a regression in that library. Surely they aren't calling null props as functions?? Either way, this change is small on our end and seems less fragile to upstream problems. I am going to approve and merge so the problem doesn't wind its way to prod.

@stalgiag stalgiag merged commit d118b35 into development Jul 17, 2024
2 checks passed
@stalgiag stalgiag deleted the fix-modal-onhide branch July 17, 2024 20:22
howard-e added a commit that referenced this pull request Jul 22, 2024
Includes the following changes:

**Features and Fixes**
* #1125 
* #1135
* #1144
* #1146
* #1150
* #1152
* #1153
* #1160

**Infrastructure changes**
* #969
* #1151
* #1148

---------

Co-authored-by: alflennik <[email protected]>
Co-authored-by: Mx Corey Frang <[email protected]>
Co-authored-by: cypress evelyn masso <[email protected]>
Co-authored-by: Stalgia Grigg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants