Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: collapse drawer when menu item is clicked #1521

Merged
merged 7 commits into from Apr 20, 2022
Merged

Conversation

reallybeard
Copy link
Contributor

@reallybeard reallybeard commented Apr 19, 2022

Description

  • when the drawer is open its trapping focus so we need to collapse it whenever you click on a menu item
  • Pass down the onClose from the useDisclosure
  • Add a helper handleClick function that fires the onClose and the onClick

Notice

  • Have you followed the guidelines in our Contributing guide?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Pull Request Type

  • 🐛 Bug fix (Non-breaking Change: Fixes an issue)
  • 🛠️ Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
  • 💅 New Feature (Breaking/Non-breaking Change)

Issue (if applicable)

closes #1400

Risk

Small risk

Testing

Click on a switch wallet or submit feedback/settings the drawer should collapse giving focus to whatever menu you just clicked.

Screenshots (if applicable)

@reallybeard reallybeard requested review from a team and 0xApotheosis as code owners April 19, 2022 19:40
@cloudflare-pages
Copy link

cloudflare-pages bot commented Apr 19, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3e34115
Status: ✅  Deploy successful!
Preview URL: https://8df389f8.web-29e.pages.dev

View logs

Copy link
Collaborator

@NeOMakinG NeOMakinG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@0xApotheosis 0xApotheosis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the approach, but it doesn't seem to fix it for me. When I click "Switch wallet" the draw stays open and I can't type in any inputs, see screenshot below.

Tested with the responsive dev tools in Brave.

@NeOMakinG I see an approval from you, did it work ok for you when testing?

Screen Shot 2022-04-20 at 2 43 37 pm

@reallybeard
Copy link
Contributor Author

I like the approach, but it doesn't seem to fix it for me. When I click "Switch wallet" the draw stays open and I can't type in any inputs, see screenshot below.

Tested with the responsive dev tools in Brave.

@NeOMakinG I see an approval from you, did it work ok for you when testing?

Screen Shot 2022-04-20 at 2 43 37 pm

Doesn't seem to work on the cloudflare pages deployment... looking into it

Copy link
Contributor

@0xApotheosis 0xApotheosis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last commit fixed it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switching Wallets Import Seed Issues - From any wallet to Native on mobile
3 participants