MetaMask / MetaMask/metamask-extension
[Extension] [Bug]: Perps - Autoclose fields disappear when switching from Market to Limit tab
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
**Describe the bug**
When opening a position in **Perps** with **Autoclose enabled** on the **Market tab**, switching to the **Limit tab** causes the Autoclose fields (Take Profit / Stop Loss) to disappear. The Autoclose toggle state is preserved but the fields are not rendered.
**Expected behavior**
If Autoclose is enabled, the Autoclose fields (TP/SL) should remain visible and functional regardless of whether the user is on the Market or Limit tab.
**Screenshots/Recordings**
_Reporter to attach screenshot/recording if available._
**Steps to reproduce**
1. Open MetaMask Extension
2. Navigate to **Perps** and open a position
3. On the **Market tab**, enable **Autoclose**
4. Verify the Autoclose fields (TP/SL) are visible
5. Switch to the **Limit tab**
6. Observe that the **Autoclose fields no longer appear**
**Error messages or log output**
_No error message displayed._
**Where was this bug found?**
Internal release testing
**Version**
13.45.0
**Browser**
Chrome
**Operating system**
MacOS
**Additional context**
- The Autoclose toggle remains on after switching tabs, but the fields are not rendered in the Limit tab view
- Likely the Limit tab is not consuming the Autoclose state to conditionally render the TP/SL fields
- Team: Perps
- Severity: Sev2
**Severity**
_To be filled by internal support / PM_
Contributor guide
Research direction
Start by reproducing the issue in the MetaMask Extension Perps position flow, switching from the Market tab to the Limit tab after enabling Autoclose. Trace how the Autoclose state is consumed by the Limit tab; done means the Take Profit and Stop Loss fields remain visible and functional on both tabs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100