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.

[Question / Feature Request] keyboardShouldPersistTaps to prevent need for double tapping

See original GitHub issue

I’ve implemented this like your example but the main issue I am having is that it takes two taps to select the list item. The first tap dismisses the keyboard and then the second will select the row- which should happen on the first tap.

This sounds similar to this so I’m wondering if you could provide some insight on if it’s from the same issue, if everyone on this library is affected, and if it can be fixed. I tried adding the prop keyboardShouldPersistTaps={true} but it had no effect.

Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12

github_iconTop GitHub Comments

11reactions
jeanpaulsiocommented, Oct 31, 2017

I was able to get persistent taps working. I have the auto complete component as a child of ScrollView

  <ScrollView
    keyboardShouldPersistTaps={"always"}
  >
    <GooglePlacesAutocomplete />
  </ScrollView>

I believe keyboardShouldPersistTaps={true} is deprecated. Hope this helps!

5reactions
BryonAppscommented, May 7, 2018

Make sure that any parent ScrollViews (or FlatList, etc.) of your GooglePlacesAutocomplete component have the prop keyboardShouldPersistTaps={‘always’}set. This resolved the problem for me. Good luck!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Double Tap Button issue when keyBoard opens React native
I have tried with keyboardShouldPersistTaps=handled also but still, I have to tap twice on my Custom Button to perform an action.
Read more >
keyboardavoidingview modal | The search engine you control.
Need to double press to release focus on Text Input from within a Modal with KeyboardAvoidingView. Asked Jul 2, 2019 • 1 votes...
Read more >
Today's React Native Tip: Keyboard issues in ScrollView
Problem 1: Button needs to be tapped twice. When the keyboard is up, tapping anywhere else on the page will require you to...
Read more >
Fullstack React Native
React Native is rich and feature-filled, but that also means it can be ... requests to fetch data that the component would need....
Read more >
React-native-gifted-chat: The Most Complete Chat UI for React ...
The messages prop should work out-of-the-box with Redux. In most cases, this is all you need. If you decide to specify a text...
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