LoginSignup
1
3

More than 5 years have passed since last update.

Modal の中の ScrollView 系 Component の keyboardShouldPersistTaps 指定が効かない

Posted at
<ScrollView>
  <Modal>
    <ScrollView
      keyboardShouldPersistTaps="handled"
    >
    </ScrollView>
  </Modal>
</ScrollView>

こういう構造していると Modal の中の ScrollView に keyboardShouldPersistTaps を指定しても、期待した通りに動きません。
どうすれば良いかというと、Modal の親にも同じ attribute を指定します。

<ScrollView
  keyboardShouldPersistTaps="handled"
>
  <Modal>
    <ScrollView
      keyboardShouldPersistTaps="handled"
    >
    </ScrollView>
  </Modal>
</ScrollView>

refs: https://github.com/facebook/react-native/issues/10138

1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3