question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Menu doesn't close onTapOutside on mobile

See original GitHub issue
  • downshift version: 1.31.2
  • node version: 8.11.1
  • npm (or yarn) version: yarn 1.5.0

Relevant code or config

https://codesandbox.io/s/9rWEmzEv8 (downshift demo by @kentcdodds)

What you did/What happened:

On desktop:

  • click on the button
  • the menu opens
  • click outside the select
  • the menu closes

On mobile:

  • tap on the button
  • the menu opens
  • tap outside the select
  • the menu stays open

Reproduction repository:

https://codesandbox.io/s/9rWEmzEv8

Problem description:

I’m not sure this is intended? Or is it, to prevent fat fingering?

Suggested solution:

Close the menu onTapOutside if that is what we want

Thanks for this awesome package!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
adrienharnaycommented, Apr 23, 2018

Just upgraded and tested, works like a charm 👍 Thanks a lot!

1reaction
kentcdoddscommented, Apr 20, 2018

Oh, you’re right. Sorry about that 😅

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Trying to close mobile menu when clicking outside ...
So we are opening the menu when clicking on class hamburger and we want to close the menu if the next click is...
Read more >
Route traffic to an Amazon FSx for NetApp ONTAP Multi-AZ ...
In this post, I walk through setting up a Multi-Availability Zone NLB, which will provide a DNS name that can be used to...
Read more >
How to add a navigation drawer in Flutter - LogRocket Blog
The navigation drawer is added using the Drawer widget. It can be opened via swipe gesture or by clicking on the menu icon...
Read more >
Close mobile menu when click/tap outside - GeneratePress
Hi,. My mobile menu doesn't close when clicked/tapped outside of it. I would like it to do so. If I have a sub-menu...
Read more >
Touch events - Web APIs - MDN Web Docs - Mozilla
Then we get the context and pull the list of changed touch points out of the event's TouchEvent.changedTouches property.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found