fix: hide modal upon keyboard blur
Description
This change mimics the mousedown event of Modals, extending the same functionality to blurring the Modal via tabbing out of the first or last element via the keyboard tab key. With this PR, if you tab off of the first or last item of a given modal, the modal is closed, just clicking outside the Modal would.
Test plan
- Click the top bar's "..." item
- Continuously press
[tab] - When tabbing off the last item, the modal will close
- Click the top bar's "..." item
- Press
shit-tabto bail out of the first item, see the modal close
Visual
https://github.com/Uniswap/interface/assets/46655/c00fd817-4402-41f0-a6d9-01c39caf024f
QA (ie manual testing)
- [ ] N/A
Devices
Automated testing
- [ ] Unit test
- [ ] Integration/E2E test
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| interface | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 12, 2023 2:32am |
Codecov Report
Merging #7457 (08a46a2) into main (5fee3c6) will decrease coverage by
0.10%. Report is 9 commits behind head on main. The diff coverage is100.00%.
| Flag | Coverage Δ | |
|---|---|---|
| cloud-tests | ? |
|
| unit-tests | 42.82% <100.00%> (+<0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
lgtm, thanks for the fix!
Bump on cloud tests?