fix: increase clickable outside area from asset list control buttons#39823
Merged
fix: increase clickable outside area from asset list control buttons#39823
Conversation
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Contributor
✨ Files requiring CODEOWNER review ✨💎 @MetaMask/metamask-assets (3 files, +41 -76)
|
Prithpal-Sooriya
approved these changes
Feb 5, 2026
n3ps
approved these changes
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes an issue where clicking outside the sort/import popovers did not close them.
Root cause: All popovers used the entire
asset-list-control-barBox as theirreferenceElement. The Popover'sonClickOutsideexcludes clicks inside the reference element, making the exclusion zone too large.Solution: Use specific refs for each popover trigger button instead of the entire control bar:
sortButtonReffor the sort buttonimportButtonReffor the import control buttonImportControlto useforwardRefto receive the refChangelog
CHANGELOG entry: Increased clickable area to close buttons in asset list control bar
Related issues
Fixes: #37628
Manual testing steps
Screenshots/Recordings
Before
See issue description
After
increase.clickable.area.outside.asset.list.control.bar.buttons.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
UI-only refactoring of popover anchoring and minor test updates; low risk aside from potential popover positioning/regression in click-outside behavior.
Overview
Fixes a UX bug where clicking “outside” the asset list sort/import popovers wouldn’t close them by changing each
Popover’sreferenceElementfrom the whole control bar to a dedicated ref on the corresponding trigger button.ImportControlis updated toforwardRefso the import popovers can anchor to the actual button, and dead network-filter popover state/code is removed. Tests are adjusted to use consistentfireEvent.clickinteractions.Written by Cursor Bugbot for commit 5de4bca. This will update automatically on new commits. Configure here.