title: onPress() function of TouchableOpacity does not work at first if the keyboard is open
body: <p>I have used TouchableOpacity as my submit button, after filling the form(Login/Registration/...) when I click on submit button(TouchableOpacity), the keyboard hides (if open), and then I need to press again on submit button and then the onPress method gets called.</p>
  
  <p>What I want to achieve is if I click on submit button, the onPress() method should call, regardless of the keyboard is open or not. I have to click two times to submit the form which does not look good.</p>
  
  <p>Also, I have not tested this behaviour on IOS, android only. </p>
  
  <p><strong>EDIT:1</strong></p>
  
  <p>Login Screen Code =></p>
  
  <pre><code>&lt;KeyboardAvoidingView&gt;
     &lt;ScrollView&gt;
      &lt;View style={styles.container}&gt;
      &lt;View style={styles.container_one}&gt;
          &lt;Image
          style={{ height: 100, marginTop: 40 }}
          source={require("../images/logo.png")}
          /&gt;
      &lt;/View&gt;
  
      &lt;View style={styles.container_three}&gt;
          &lt;View&gt;
          &lt;View style={styles.container_two}&gt;
              &lt;Text style={styles.text_style_two}&gt;Login&lt;/Text&gt;
          &lt;/View&gt;
  
          &lt;View&gt;
              &lt;Text style={styles.text_style_three}&gt;
              Please enter mobile number
              &lt;/Text&gt;
              &lt;TextInput
              style={styles.text_input_1}
              autoCapitalize="none"
              keyboardType="numeric"
              onChangeText={text =&gt; {
                  this.setState({
                  username: text
                  });
              }}
              value={this.state.username}
              /&gt;
          &lt;/View&gt;
  
          &lt;View&gt;
              &lt;Text style={styles.text_style_three}&gt;
              Please enter your password
              &lt;/Text&gt;
              &lt;TextInput
              style={styles.text_input_1}
              secureTextEntry={true}
              autoCapitalize="none"
              onChangeText={text =&gt; {
                  this.setState({
                  password: text
                  });
              }}
              value={this.state.password}
              /&gt;
          &lt;/View&gt;
          &lt;View
              style={{
              width: screenWidth / 1.3,
              flexDirection: "row",
              justifyContent: "center"
              }}
          &gt;
              &lt;View&gt;
              &lt;TouchableOpacity
                  style={styles.button_1}
                  onPress={() =&gt; {
                  if (this.state.username == "") {
                      alert("Username can not be blank");
                  } else if (this.state.password == "") {
                      alert("Password can not be blank");
                  } else {
                      this.submitLogin(
                      this.state.username,
                      this.state.password
                      );
                  }
                  }}
              &gt;
                  &lt;Text style={CommonStyles.buttonText}&gt;Login&lt;/Text&gt;
              &lt;/TouchableOpacity&gt;
              &lt;/View&gt;
          &lt;/View&gt;
          &lt;/View&gt;
      &lt;/View&gt;
      &lt;View style={{ alignItems: "center" }}&gt;
          &lt;View style={{ marginBottom: 10 }}&gt;
          &lt;Text style={{ fontSize: 20 }}&gt;-OR-&lt;/Text&gt;
          &lt;/View&gt;
          &lt;View style={{ marginBottom: 10 }}&gt;
          &lt;TouchableOpacity
              onPress={() =&gt; {
              this.props.navigation.navigate("Registration");
              }}
          &gt;
              &lt;Text style={styles.text_style_one}&gt;Sign up here&lt;/Text&gt;
          &lt;/TouchableOpacity&gt;
          &lt;/View&gt;
      &lt;/View&gt;
      &lt;View style={{ alignItems: "center" }}&gt;
          &lt;View style={{ marginBottom: 10 }}&gt;&lt;/View&gt;
  
          &lt;View style={{ marginBottom: 10 }}&gt;
          &lt;TouchableOpacity
              onPress={() =&gt; {
              this.props.navigation.navigate("ForgotPassword");
              }}
          &gt;
              &lt;Text style={styles.text_style_five}&gt;forgot password?/Text&gt;
          &lt;/TouchableOpacity&gt;
          &lt;/View&gt;
      &lt;/View&gt;
      &lt;/View&gt;
    &lt;/ScrollView&gt;
  &lt;/KeyboardAvoidingView&gt;
  </code></pre>