onPress event for child nodes seem to get blocked on iOS
Hi there! This is a great library, although I'm having some trouble with nested, styled <Text> components inside a SelectableText.
I'm doing the following:
<SelectableText
value={textElements}
style={style}
menuItems={[
'foo',
'bar'
]}
onSelection={this.pressedSelection}
/>
where textElements is an array of <Text onPress={myOnPressFn} style={{myStyle}}> elements with custom styles and highlights. However, myOnPressFn does not get called on iOS, only on Android. Why might this be?
Kind regards, Jonas
Hello, We are facing this same issue. onPress doesn't do anything on iOS, does anyone have a solution for this issue?
As @sbatson5 pointed out in the duplicate of this issue (#55), this seems to be a limitation because SelectableText on iOS is using TextInput (if I'm understanding this line correctly although I readily admit my Objective C is not strong) The Android native view however is inheriting from TextView and seems to pass onPress events correctly to its children
Is there a reason the iOS native view is built on top of TextInput instead of TextView?