Skip to content

Touch/Mouse Input Will Not Leak To Child Components of ScrollView After Focus is in TextInput (Since 0.62) #5867

Closed
@NickGerleman

Description

@NickGerleman

From @KAnder425

I've got a repro in the playground. It's in my repo at https://github.com/KAnder425/react-native-windows/commit/93a31c0dca5c08c8ef82bf6ff4887ffc8db40eba

To repro you must put your focus back in the Text Input after bringing up the Popup. The first touch event after that will be ignored (see ("I'm touched" counter).

I also have a gif of the repro attached.
PopupRepro

The key pieces are;

  • Popup must be isLightDismissEnable (false)
  • The Touchable must be in a ScrollView
  • Focus must be in a TextInput outside of the Popup (or maybe just outside the Touchable, IDK)

I did notice that the same behavior (eg. swallowing a touch event) occurs more broadly in our app as well as in RNTester, because it really doesn't depend on the Popup. You can repro this in the FlatList example in RNTester if you just put focus into a TextInput before clicking on the FlatList elements.

For now, I've been able to workaround this in our app by setting the 'keyboardShouldPersistTaps' property (either 'always' | 'handled') on the ScrollView that contains the TextInput, but I'd prefer a solution in RNW. agree it's quite tricky

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions