interface icon indicating copy to clipboard operation
interface copied to clipboard

fix: hide modal upon keyboard blur

Open darkwing opened this issue 2 years ago • 4 comments

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

  1. Click the top bar's "..." item
  2. Continuously press [tab]
  3. When tabbing off the last item, the modal will close
  4. Click the top bar's "..." item
  5. Press shit-tab to 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

darkwing avatar Oct 12 '23 02:10 darkwing

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

vercel[bot] avatar Oct 12 '23 02:10 vercel[bot]

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 is 100.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.

codecov[bot] avatar Oct 16 '23 22:10 codecov[bot]

lgtm, thanks for the fix!

infredible avatar Oct 17 '23 22:10 infredible

Bump on cloud tests?

darkwing avatar Nov 22 '23 00:11 darkwing