Skip to content

Commit cca20b6

Browse files
release(runway): cherry-pick fix: fixed entry modal closed error cp-13.11.0 cp-13.10.2 (#38197)
- fix: fixed entry modal closed error cp-13.11.0 (#38188) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> This PR fixed entry modal closed error. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/38188?quickstart=1) ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: fixed entry modal closed error ## **Related issues** Fixes: #38096 ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Wrap `onClose` handlers in `ShieldEntryModal` with callbacks to call `handleOnClose()` directly, preventing close errors. > > - **UI**: > - In `ui/components/app/shield-entry-modal/shield-entry-modal.tsx`: > - Update `Modal` and `ModalHeader` `onClose` props from `onClose={handleOnClose}` to `onClose={() => handleOnClose()}` to ensure proper invocation without unintended arguments. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 5b4a45e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> [e7f54a4](e7f54a4) Co-authored-by: Lwin <[email protected]>
1 parent e4e8c88 commit cca20b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/components/app/shield-entry-modal/shield-entry-modal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ const ShieldEntryModal = ({
173173
autoFocus={false}
174174
isClosedOnOutsideClick={false}
175175
isClosedOnEscapeKey={false}
176-
onClose={handleOnClose}
176+
onClose={() => handleOnClose()}
177177
className="shield-entry-modal"
178178
data-theme={ThemeType.dark}
179179
>
@@ -185,7 +185,7 @@ const ShieldEntryModal = ({
185185
className="shield-entry-modal__content"
186186
>
187187
<ModalHeader
188-
onClose={handleOnClose}
188+
onClose={() => handleOnClose()}
189189
closeButtonProps={{
190190
'data-testid': 'shield-entry-modal-close-button',
191191
className: 'absolute top-2 right-2',

0 commit comments

Comments
 (0)