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.

Mobile Safai doesn't close when tapping outside the control

See original GitHub issue

When using an iPad or iPhone, clicking outside the opened flatpickr does not close it.

Expected Behavior

It should close.

Current Behavior

It doesn’t close.

Possible Solution

In the bind() method, document.addEventListener("click", documentClick); does not work on non-link elements in mobile Safari (see http://stackoverflow.com/questions/3705937/document-click-not-working-correctly-on-iphone-jquery). A possible solution could be when the control opens on a mobile device to add a class to the body, the class would contain cursor: pointer; to work around the issue (might need to add this to an invisible overlay between the page and the control…)

Steps to Reproduce (for bugs)

  1. Open flatpickr on an iPad
  2. Click on a part of the page outside of flatpickr.
  3. Flatpickr does not close as expected.

Context

It makes using the control on an iPad a bit frustrating.

Your Environment

  • Version used: 2
  • Browser Name and version: Mobile Safari
  • Operating System and version (desktop or mobile): iOS 10

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
wekiicommented, Jan 18, 2017

I can confirm that in Flatpickr v2.3.4 this issue is present on mobile Safari on iOS 10.

1reaction
chmlncommented, Jan 9, 2017

Kindly re-open the issue if any problems still persist. Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Open and close tabs in Safari on iPad - Apple Support
Close tabs. Tap the Tabs button , then tap the Close button in the upper-right corner of a tab to close it.
Read more >
Open and close tabs in Safari on iPhone - Apple Support
Tip: To close all tabs in this Tab Group at the same time, touch and hold Done, then tap Close All Tabs. Open...
Read more >
Customize your Safari settings on iPad - Apple Support
Use the Page Settings button to switch to Reader, hide the search field, set privacy controls for a website, and more. Tap the...
Read more >
Block pop-up ads and windows in Safari - Apple Support
Learn how to block pop-up windows and handle persistent ads on your iPhone, iPad, or Mac.
Read more >
Clear the history and cookies from Safari on your iPhone, iPad ...
Delete history, cache, and cookies ... To clear your history and cookies, go to Settings > Safari, and tap Clear History and Website...
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